From mj at zopatista.com Thu Nov 8 17:31:40 2007 From: mj at zopatista.com (Martijn Pieters) Date: Thu Nov 8 17:31:51 2007 Subject: [egenix-users] mx.ODBC buildout recipe Message-ID: <21a6ef160711080831q1fe5886s84e5c675fb257c94@mail.gmail.com> I created a buildout recipe to download and install mx.ODBC, and install the license key with it: http://svn.plone.org/svn/collective/buildout/collective.recipe.mxodbc/ It currently only supports Linux and Mac downloads, as I don't want to go into dealing with MSI distributions on Windows and I don't know what the platform.system() and platform.machine() values are for Solaris and FreeBSD. Patches welcome, or use the url parameter to specify the platform directly. Also note that it doesn't handle the mxBase dependency, I am relying on the buildout python already having that installed right now. -- Martijn Pieters From mj at zopatista.com Thu Nov 8 17:52:09 2007 From: mj at zopatista.com (Martijn Pieters) Date: Thu Nov 8 17:52:17 2007 Subject: [egenix-users] Re: mx.ODBC buildout recipe In-Reply-To: <21a6ef160711080831q1fe5886s84e5c675fb257c94@mail.gmail.com> References: <21a6ef160711080831q1fe5886s84e5c675fb257c94@mail.gmail.com> Message-ID: <21a6ef160711080852i791638f8wa086b09deb6a4e9f@mail.gmail.com> On Nov 8, 2007 5:31 PM, Martijn Pieters wrote: > Also note that it doesn't handle the mxBase dependency, I am relying > on the buildout python already having that installed right now. I spoke too soon. As the mx package is not a setuptools namespace, you cannot install mx.ODBC anywhere else but in the same place. Or vice versa. I'll have to rethink this somewhat. -- Martijn Pieters From mj at zopatista.com Thu Nov 8 18:29:04 2007 From: mj at zopatista.com (Martijn Pieters) Date: Thu Nov 8 18:29:16 2007 Subject: [egenix-users] Re: mx.ODBC buildout recipe In-Reply-To: <21a6ef160711080852i791638f8wa086b09deb6a4e9f@mail.gmail.com> References: <21a6ef160711080831q1fe5886s84e5c675fb257c94@mail.gmail.com> <21a6ef160711080852i791638f8wa086b09deb6a4e9f@mail.gmail.com> Message-ID: <21a6ef160711080929m840eff3lbda9039d4ac338d3@mail.gmail.com> On Nov 8, 2007 5:52 PM, Martijn Pieters wrote: > On Nov 8, 2007 5:31 PM, Martijn Pieters wrote: > > Also note that it doesn't handle the mxBase dependency, I am relying > > on the buildout python already having that installed right now. > > I spoke too soon. As the mx package is not a setuptools namespace, you > cannot install mx.ODBC anywhere else but in the same place. Or vice > versa. I'll have to rethink this somewhat. The recipe now also installs the mx-base packages in the same place. -- Martijn Pieters From mal at egenix.com Fri Nov 9 11:30:19 2007 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Nov 9 11:30:47 2007 Subject: [egenix-users] Re: mx.ODBC buildout recipe In-Reply-To: <21a6ef160711080929m840eff3lbda9039d4ac338d3@mail.gmail.com> References: <21a6ef160711080831q1fe5886s84e5c675fb257c94@mail.gmail.com> <21a6ef160711080852i791638f8wa086b09deb6a4e9f@mail.gmail.com> <21a6ef160711080929m840eff3lbda9039d4ac338d3@mail.gmail.com> Message-ID: <473436BB.9030304@egenix.com> On 2007-11-08 18:29, Martijn Pieters wrote: > On Nov 8, 2007 5:52 PM, Martijn Pieters wrote: >> On Nov 8, 2007 5:31 PM, Martijn Pieters wrote: >>> Also note that it doesn't handle the mxBase dependency, I am relying >>> on the buildout python already having that installed right now. >> I spoke too soon. As the mx package is not a setuptools namespace, you >> cannot install mx.ODBC anywhere else but in the same place. Or vice >> versa. I'll have to rethink this somewhat. > > The recipe now also installs the mx-base packages in the same place. Thanks, Martijn. I'm sure other users of ZC buildout will appreciate your work. I had a brief look at the code: wouldn't it be better to use the prebuilt packages for mx-base as well ? Regarding Windows: if it makes things easier for you, we could also build prebuilt archives for Windows. The installers are the better approach for system administration purposes, but the prebuilt archives would work just as well. A lot of the code in the Recipe looks like boiler-plate code. Doesn't buildout provide a base class for this ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 09 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 From mj at zopatista.com Fri Nov 9 11:58:44 2007 From: mj at zopatista.com (Martijn Pieters) Date: Fri Nov 9 11:59:01 2007 Subject: [egenix-users] Re: mx.ODBC buildout recipe In-Reply-To: <473436BB.9030304@egenix.com> References: <21a6ef160711080831q1fe5886s84e5c675fb257c94@mail.gmail.com> <21a6ef160711080852i791638f8wa086b09deb6a4e9f@mail.gmail.com> <21a6ef160711080929m840eff3lbda9039d4ac338d3@mail.gmail.com> <473436BB.9030304@egenix.com> Message-ID: <21a6ef160711090258t13f38a22meadfba4762ca759d@mail.gmail.com> On Nov 9, 2007 11:30 AM, M.-A. Lemburg wrote: > > The recipe now also installs the mx-base packages in the same place. > > Thanks, Martijn. I'm sure other users of ZC buildout will appreciate > your work. > > I had a brief look at the code: wouldn't it be better to use the > prebuilt packages for mx-base as well ? The code is far simpler for just building the source, and we're already building Zope and Varnish anyway. > Regarding Windows: if it makes things easier for you, we could > also build prebuilt archives for Windows. The installers are the > better approach for system administration purposes, but the > prebuilt archives would work just as well. I am not fussed about Windows that much, myself. If someone wants to use the buildout recipe targeting Windows, they may want to have that though. The recipe lives in a repository with a really low threshold to gaining write access, so it should be ease enough for someone else to add that at a later point. :-) > A lot of the code in the Recipe looks like boiler-plate code. > Doesn't buildout provide a base class for this ? zc.buildout is part agnostic; it keeps well out of what parts want to accomplish. For many recipes setuptools is the base library, or zc.recipe.egg. There are other recipe eggs I could reuse for the downloading part, but the code is simple enough and interoperates nicely with those other recipes in that it reuses the same download repository (which can be configured to be a directory shared by all buildouts). So on the whole, it's not really boilerplate at all; generally one uses more generic recipes which you then configure with entries in the buildout config. There is a CMMI (config, make, make install) recipe that you generally just give a URL, for example. -- Martijn Pieters From mal at egenix.com Fri Nov 9 12:39:33 2007 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Nov 9 12:39:41 2007 Subject: [egenix-users] Re: mx.ODBC buildout recipe In-Reply-To: <21a6ef160711090258t13f38a22meadfba4762ca759d@mail.gmail.com> References: <21a6ef160711080831q1fe5886s84e5c675fb257c94@mail.gmail.com> <21a6ef160711080852i791638f8wa086b09deb6a4e9f@mail.gmail.com> <21a6ef160711080929m840eff3lbda9039d4ac338d3@mail.gmail.com> <473436BB.9030304@egenix.com> <21a6ef160711090258t13f38a22meadfba4762ca759d@mail.gmail.com> Message-ID: <473446F5.9000902@egenix.com> On 2007-11-09 11:58, Martijn Pieters wrote: > On Nov 9, 2007 11:30 AM, M.-A. Lemburg wrote: >>> The recipe now also installs the mx-base packages in the same place. >> Thanks, Martijn. I'm sure other users of ZC buildout will appreciate >> your work. >> >> I had a brief look at the code: wouldn't it be better to use the >> prebuilt packages for mx-base as well ? > > The code is far simpler for just building the source, and we're > already building Zope and Varnish anyway. Fair enough. Just thought it would make the buildout run faster. Since have already decoded our URL scheme for packages, reusing that code would be a breeze ;-) >> Regarding Windows: if it makes things easier for you, we could >> also build prebuilt archives for Windows. The installers are the >> better approach for system administration purposes, but the >> prebuilt archives would work just as well. > > I am not fussed about Windows that much, myself. If someone wants to > use the buildout recipe targeting Windows, they may want to have that > though. The recipe lives in a repository with a really low threshold > to gaining write access, so it should be ease enough for someone else > to add that at a later point. :-) Ok, let me know if someone has a need. It's easy enough to add this to our build system. >> A lot of the code in the Recipe looks like boiler-plate code. >> Doesn't buildout provide a base class for this ? > > zc.buildout is part agnostic; it keeps well out of what parts want to > accomplish. For many recipes setuptools is the base library, or > zc.recipe.egg. > > There are other recipe eggs I could reuse for the downloading part, > but the code is simple enough and interoperates nicely with those > other recipes in that it reuses the same download repository (which > can be configured to be a directory shared by all buildouts). > > So on the whole, it's not really boilerplate at all; generally one > uses more generic recipes which you then configure with entries in the > buildout config. There is a CMMI (config, make, make install) recipe > that you generally just give a URL, for example. Doesn't it also have such a generic recipe for the usual Python "python setup.py install" dance ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 09 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 From mj at zopatista.com Fri Nov 9 13:13:07 2007 From: mj at zopatista.com (Martijn Pieters) Date: Fri Nov 9 13:13:14 2007 Subject: [egenix-users] Re: mx.ODBC buildout recipe In-Reply-To: <473446F5.9000902@egenix.com> References: <21a6ef160711080831q1fe5886s84e5c675fb257c94@mail.gmail.com> <21a6ef160711080852i791638f8wa086b09deb6a4e9f@mail.gmail.com> <21a6ef160711080929m840eff3lbda9039d4ac338d3@mail.gmail.com> <473436BB.9030304@egenix.com> <21a6ef160711090258t13f38a22meadfba4762ca759d@mail.gmail.com> <473446F5.9000902@egenix.com> Message-ID: <21a6ef160711090413s58a8788epba495692c83862a1@mail.gmail.com> On Nov 9, 2007 12:39 PM, M.-A. Lemburg wrote: > > The code is far simpler for just building the source, and we're > > already building Zope and Varnish anyway. > > Fair enough. Just thought it would make the buildout run faster. > Since have already decoded our URL scheme for packages, > reusing that code would be a breeze ;-) With current CPU speeds, the build time is hardly noticeable when compared with the download speed.. ;-) It only needs to run once, buildout is smart enough to not rerun the part if the config and recipe don't change. > Doesn't it also have such a generic recipe for the usual Python > "python setup.py install" dance ? Perhaps, but I haven't found it, I suspect this is usually deferred to setuptools. I didn't look that hard though. But your extensions and the 'build --skip' shenanigans complicate things too of course. I briefly looked into importing the setup.py directly, but you run setup directly on import, resulting in a sys.exit(1) so that wasn't a feasible route. -- Martijn Pieters From mal at egenix.com Thu Nov 15 22:52:21 2007 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Nov 15 22:52:27 2007 Subject: [egenix-users] eGenix mx Base and ODBC for AIX Message-ID: <473CBF95.4040002@egenix.com> Dear eGenix Users, we need your help... We've built versions of egenix-mx-base 3.0.1 and egenix-mxodbc 3.0.1 for AIX 5.3 on a Power5 machine. Unfortunately, we only have a very short time window to do tests on these due to the machines only being available for a few days, so would appreciate if you could give them a try as well. These are the download links (please make sure you install the right combination for the Python version you're using): http://downloads.egenix.com/python/egenix-mx-base-3.0.1.aix-5.3-py2.3_ucs2.prebuilt.zip http://downloads.egenix.com/python/egenix-mx-base-3.0.1.aix-5.3-py2.3_ucs4.prebuilt.zip http://downloads.egenix.com/python/egenix-mx-base-3.0.1.aix-5.3-py2.4_ucs2.prebuilt.zip http://downloads.egenix.com/python/egenix-mx-base-3.0.1.aix-5.3-py2.4_ucs4.prebuilt.zip http://downloads.egenix.com/python/egenix-mx-base-3.0.1.aix-5.3-py2.5_ucs2.prebuilt.zip http://downloads.egenix.com/python/egenix-mx-base-3.0.1.aix-5.3-py2.5_ucs4.prebuilt.zip http://downloads.egenix.com/python/egenix-mxodbc-3.0.1.aix-5.3-py2.3_ucs2.prebuilt.zip http://downloads.egenix.com/python/egenix-mxodbc-3.0.1.aix-5.3-py2.3_ucs4.prebuilt.zip http://downloads.egenix.com/python/egenix-mxodbc-3.0.1.aix-5.3-py2.4_ucs2.prebuilt.zip http://downloads.egenix.com/python/egenix-mxodbc-3.0.1.aix-5.3-py2.4_ucs4.prebuilt.zip http://downloads.egenix.com/python/egenix-mxodbc-3.0.1.aix-5.3-py2.5_ucs2.prebuilt.zip http://downloads.egenix.com/python/egenix-mxodbc-3.0.1.aix-5.3-py2.5_ucs4.prebuilt.zip Installation is easy: python setup.py build --skip install You'll need an eval license for mxODBC 3.0 in order for it to work. Here's the link to the signup page: http://www.egenix.com/products/python/mxODBC/evalrequest/?product=mxODBC Please see the product pages for further details on how to install the packages: http://www.egenix.com/products/python/mxBase/ http://www.egenix.com/products/python/mxODBC/ Note that the above versions were compiled with gcc against Python versions which were also compiled with gcc. If you experience problems with Python versions compiled with IBM's compiler, please let us know. Thanks for any suggestions and problem reports, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 15 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 From timmcilveen at talktalk.net Sat Nov 17 23:44:31 2007 From: timmcilveen at talktalk.net (tim) Date: Sun Nov 18 00:45:57 2007 Subject: [egenix-users] error installing mx base on Suse 10.3 Message-ID: <1195343071.4371.5.camel@linux-qvtz.site> Hi, I am setting up biopython on my Suse Linux 10.3 which requires mxtexttools. I have Python 2.5.1 installed on my system already. After downloading mxTextTools i unzip it and start the install, but get the error: invalid Python installation: unable to open /usr/lib/python2.5/config/Makefile (No such file or directory) Indeed when I browse to python 2.5 in /usr/lib/python2.5/ , there is no config folder. Python 2.5 works fine though, so what is going on here? Any ideas anyone? Thanks, Tim From mal at egenix.com Sun Nov 18 10:24:48 2007 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Nov 18 10:25:00 2007 Subject: [egenix-users] error installing mx base on Suse 10.3 In-Reply-To: <1195343071.4371.5.camel@linux-qvtz.site> References: <1195343071.4371.5.camel@linux-qvtz.site> Message-ID: <474004E0.1060800@egenix.com> On 2007-11-18 00:44, tim wrote: > Hi, > I am setting up biopython on my Suse Linux 10.3 which requires > mxtexttools. I have Python 2.5.1 > installed on my system already. After downloading mxTextTools i unzip it > and start the install, but get the error: > > invalid Python installation: unable to > open /usr/lib/python2.5/config/Makefile (No such file or directory) > > Indeed when I browse to python 2.5 in /usr/lib/python2.5/ , there is no > config folder. Python 2.5 works fine though, so what is going on here? > > Any ideas anyone? You need to install the python-devel package first. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 18 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 From info at egenix.com Mon Nov 19 13:43:38 2007 From: info at egenix.com (eGenix Team: M.-A. Lemburg) Date: Mon Nov 19 13:48:39 2007 Subject: [egenix-users] ANN: eGenix mxODBC and mxODBC Zope DA on AIX 5.3 (and later) Message-ID: <474184FA.3030507@egenix.com> ________________________________________________________________________ ANNOUNCING eGenix.com mxODBC Database Interface eGenix.com mxODBC Zope Database Adapter for AIX 5.3 and later This announcement is also available on our web-site for online reading: http://www.egenix.com/company/news/eGenix-mxODBC-on-AIX53-POWER5-GA.html ________________________________________________________________________ eGenix mxODBC Distribution The eGenix mxODBC Distribution is a Python database interface add-on distribution for our eGenix mx Base Distribution. It comes with mxODBC, our universal ODBC database interface for Python. Customers who have purchased licenses for other platforms and wish to move their installation to AIX 5.3 (or later), can do so without having to buy a new license. The licenses will continue to work on the AIX platform. Users of mxODBC 2.0 will have to purchase new licenses from our online shop in order to upgrade to mxODBC 3.0. You can request 30-day evaluation licenses on the product page. Downloads --------- Please visit the eGenix mxODBC Distribution page for downloads, instructions on installation and documentation of the packages. http://www.egenix.com/products/python/mxODBC/ Note that in order to use the eGenix mxODBC Distribution you need to install the eGenix mx Base Distribution first. ________________________________________________________________________ eGenix mxODBC Zope DA eGenix mxODBC Zope DA is our database interface for Zope and Plone. It is based on the mxODBC interface. Customers who have purchased licenses for other platforms and wish to move their installation to AIX 5.3 (or later), can do so without having to buy a new license. The licenses will continue to work on the AIX platform. You can request 30-day evaluation licenses on the product page. Downloads --------- Please visit the eGenix mxODBC Zope DA product page for downloads, instructions on installation and documentation of the packages. http://www.egenix.com/products/zope/mxODBCZopeDA/ ________________________________________________________________________ More Information For more information on our products, licensing and download instructions, please write to sales@egenix.com. Enjoy, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 19 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 From robert at redcor.ch Wed Nov 21 08:43:16 2007 From: robert at redcor.ch (robert rottermann) Date: Wed Nov 21 08:43:46 2007 Subject: [egenix-users] encoding problem with mxODBC and zope Message-ID: <4743E194.3050008@redcor.ch> hi there, I am having problems with mxODBC and zope. this is the relevant line from the traceback ProgrammingError: ('42000', 2403, "[unixODBC][FreeTDS][SQL Server]WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks ('?').", 4543) in zope I have told mxODBCZopeDA to ignore warnings. this makes no difference we are using : mxODBCZopeDA-1.0.10 things work fine if I do not get all of the records from the MsSQL Server. as soon as I try to get all I get the error. Is there a way to have mxODBCZopeDA to log what it gets from the MsSQL-Server? What can I do to have mxODBCZopeDA not raising an error (so I have a chance to see the bad record)? Better yet, what can I do to fix the error? thanks robert the odbc.ini entry: ------------------- Description = adressen Driver = TDS Trace = yes TraceFile = sql.log Database = IntranetApplication Servername = CHSRV26 UserName = ~Intranet_info_user Password = XXXXX the entry in /usr/etc/freetds.conf ---------------------------------- [CHSRV26] host = 172.16.2.75 port = 1433 tds version = 8.0 client charset = ISO-8859-1 the whole traceback: ------------------- 2007-11-21 06:52:26 ERROR Zope.SiteErrorLog http://zehnder2:8080/zehnderi/zehnderi/quicklinks/address-library Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Shared.DC.Scripts.Bindings, line 311, in __call__ Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 255, in _exec Module Products.CacheSetup.patch_cmf, line 123, in PT_pt_render Module TAL.TALInterpreter, line 238, in __call__ Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 749, in do_useMacro Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 457, in do_optTag_tal Module TAL.TALInterpreter, line 442, in do_optTag Module TAL.TALInterpreter, line 437, in no_tag Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 780, in do_defineSlot Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 457, in do_optTag_tal Module TAL.TALInterpreter, line 442, in do_optTag Module TAL.TALInterpreter, line 437, in no_tag Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 728, in do_defineMacro Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 772, in do_defineSlot Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 647, in do_insertStructure_tal Module Products.PageTemplates.TALES, line 221, in evaluate - URL: /zehnderi/zehnderi/quicklinks/address-library - Line 17, Column 8 - Expression: standard:'context/show_records_address_form' - Names: {'container': , 'context': , 'default': , 'here': , 'loop': , 'modules': , 'nothing': None, 'options': {'args': ()}, 'repeat': , 'request': , 'root': , 'template': , 'traverse_subpath': [], 'user': } Module Products.PageTemplates.Expressions, line 185, in __call__ Module Products.PageTemplates.Expressions, line 180, in _eval Module Products.PageTemplates.Expressions, line 77, in render Module Products.PageTemplates.ZRPythonExpr, line 76, in call_with_ns Module Shared.DC.Scripts.Bindings, line 325, in __render_with_namespace__ Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec Module Products.CMFCore.FSPageTemplate, line 195, in _exec Module Products.CacheSetup.patch_cmf, line 48, in FSPT_pt_render Module Products.CacheSetup.patch_cmf, line 123, in PT_pt_render Module TAL.TALInterpreter, line 238, in __call__ Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 507, in do_setLocal_tal Module Products.PageTemplates.TALES, line 221, in evaluate - URL: file:ZehnderiData/skins/zehnderi/db/show_records_address_form.pt - Line 13, Column 4 - Expression: - Names: {'container': , 'context': , 'default': , 'here': , 'loop': , 'modules': , 'nothing': None, 'options': {'args': ()}, 'repeat': , 'request': , 'root': , 'template': , 'traverse_subpath': [], 'user': } Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__ - __traceback_info__: context.show_records_address(search, request.get('submitted')) Module Python expression "context.show_records_address(search, request.get('submitted'))", line 1, in Module Products.CMFCore.FSPythonScript, line 108, in __call__ Module Shared.DC.Scripts.Bindings, line 311, in __call__ Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec Module Products.CMFCore.FSPythonScript, line 164, in _exec Module None, line 13, in show_records_address - - Line 13 Module Shared.DC.ZRDB.DA, line 494, in __call__ - Module Products.mxODBCZopeDA.ZopeDA, line 1503, in query Module Products.mxODBCZopeDA.ZopeDA, line 1400, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 999, in errorhandler ProgrammingError: ('42000', 2403, "[unixODBC][FreeTDS][SQL Server]WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks ('?').", 4543) Traceback (most recent call last): File "/home/zopeintranet/Zope-2.9.8-final/lib/python/zExceptions/ExceptionFormatter.py", line 156, in formatLine supp = factory(*args) TypeError: __init__() takes exactly 2 arguments (3 given) Traceback (most recent call last): File "/home/zopeintranet/Zope-2.9.8-final/lib/python/zExceptions/ExceptionFormatter.py", line 156, in formatLine supp = factory(*args) TypeError: __init__() takes exactly 2 arguments (3 given) -------------- next part -------------- A non-text attachment was scrubbed... Name: robert.vcf Type: text/x-vcard Size: 211 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20071121/ae09abc1/robert.vcf From jriveramerla at gmail.com Mon Nov 26 18:30:08 2007 From: jriveramerla at gmail.com (Jose Rivera Merla) Date: Tue Nov 27 01:30:37 2007 Subject: [egenix-users] Unicode problems with mxODBCZopeDA-1.0.10 Message-ID: <6f495610711261630led14bau3a202e48fd85d2d6@mail.gmail.com> *I am having problems displaying spanish accents like ?,?,?,? and ?. My setup is:* - Plone 3.0.3 - CMF-2.1.0 - Zope (Zope 2.10.5-final, python 2.4.4, win32) - Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] - PIL 1.1.6 *and mxodbc:* mxODBCZopeDA (Installed product mxODBCZopeDA (mxODBCZopeDA-1.0.10)) *With the following string returned from a database I get a problem:* 'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 N\xd1' *When I try to display it it doesn't display correctly, I made an experiment with the same value in a python script and it worked after I returned the following script* u'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 N\xd1' *instead of just* 'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 N\xd1' *How can I make it work? Regards, Jose * -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20071126/9cf50d2b/attachment.htm From support at egenix.com Tue Nov 27 09:15:21 2007 From: support at egenix.com (eGenix Support: Charlie Clark) Date: Tue Nov 27 09:15:46 2007 Subject: [egenix-users] Re: Can't install the "eGenix mxODBC Database Adaptor for Zope" in Plone 3.0.2 In-Reply-To: <46236.35274.qm@web59003.mail.re1.yahoo.com> References: <46236.35274.qm@web59003.mail.re1.yahoo.com> Message-ID: Am 27.11.2007, 09:07 Uhr, schrieb Vladimir Danilov : > Can't install in Plone 3.0.2 > under Win XP, > after copying two folders, > in ZMI there "eGenix odbc" type not present. > P.S. > Pathway to copy files: > C:\Plone3\Zope\lib\python\Products\mxODBCZopeDA > and > C:\Plone3\Zope\lib\python\mx > ----------------- > WinXP-SP2, > eGenix odbc 1.0.10 > Plone 3.0.2+ Hotfix. Dear Mr. Danilov, please configure Zope to run in debug mode and let us know what error message you receive when trying to start Zope. Yours sincerely Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 From mal at egenix.com Tue Nov 27 13:35:25 2007 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Nov 27 13:35:30 2007 Subject: [egenix-users] Unicode problems with mxODBCZopeDA-1.0.10 In-Reply-To: <6f495610711261630led14bau3a202e48fd85d2d6@mail.gmail.com> References: <6f495610711261630led14bau3a202e48fd85d2d6@mail.gmail.com> Message-ID: <474C0F0D.9060408@egenix.com> On 2007-11-27 01:30, Jose Rivera Merla wrote: > *I am having problems displaying spanish accents like ?,?,?,? and ?. > > My setup is:* > > - Plone 3.0.3 > - CMF-2.1.0 > - Zope (Zope 2.10.5-final, python 2.4.4, win32) > - Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit > (Intel)] > - PIL 1.1.6 > > *and mxodbc:* > mxODBCZopeDA (Installed product mxODBCZopeDA > (mxODBCZopeDA-1.0.10)) > > > *With the following string returned from a database I get a problem:* > > 'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 N\xd1' > > *When I try to display it it doesn't display correctly, I made an > experiment with the same value in a python script and it worked after I > returned the following script* > > u'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 > N\xd1' > > *instead of just* > > 'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 N\xd1' > > *How can I make it work? Could you tell us how you are reading the above string, e.g. which column data type does the table have, are you using Z SQL Methods to access the data, etc. ? Also: which database are you using and how exactly does the string show up in the browser ? The data in your string appears to be Latin-1 encoded. Prepending the "u" modifier to the string will have Python interpret it as Unicode literal and thus have Zope convert the data to whatever the page you're inserting the string into uses as encoding. If you try to insert the string as-is into, say, a UTF-8 encoded page, then the browser will have problems displaying the mixture of Latin-1 and UTF-8 data. In such a case, you have to explicitly convert the string data into UTF-8 before inserting it into the page. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 27 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 From jriveramerla at gmail.com Tue Nov 27 08:54:47 2007 From: jriveramerla at gmail.com (Jose Rivera Merla) Date: Tue Nov 27 15:55:05 2007 Subject: [egenix-users] Unicode problems with mxODBCZopeDA-1.0.10 In-Reply-To: <474C0F0D.9060408@egenix.com> References: <6f495610711261630led14bau3a202e48fd85d2d6@mail.gmail.com> <474C0F0D.9060408@egenix.com> Message-ID: <6f495610711270654h1065c3b3s778de4711e3ba577@mail.gmail.com> *Hi, here it is the info requested, DB: *MS SQL Server 2000 *Table:*CatalogoDeEspacios *4 Fields:* espacio_id int no 4 10 0 no (n/a) (n/a) NULL *espacio* nvarchar no 510 yes (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS specs nvarchar no 510 yes (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS POP nvarchar no 510 yes (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS *I have the problems with the column espacio. And I return the data with a SQL Method, and when I found the poblem started makeing tests with a python script, and thats why I detected that specifing it as unicode (u'string') solved the problem, but can this be done somewhere else so I don't have to do it for each column of characters? Regards, Jose * On Nov 27, 2007 6:35 AM, M.-A. Lemburg wrote: > On 2007-11-27 01:30, Jose Rivera Merla wrote: > > *I am having problems displaying spanish accents like ?,?,?,? and ?. > > > > My setup is:* > > > > - Plone 3.0.3 > > - CMF-2.1.0 > > - Zope (Zope 2.10.5-final, python 2.4.4, win32) > > - Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit > > (Intel)] > > - PIL 1.1.6 > > > > *and mxodbc:* > > mxODBCZopeDA (Installed product mxODBCZopeDA > > (mxODBCZopeDA-1.0.10))< > http://fctcmty01:8080/Control_Panel/Products/mxODBCZopeDA/manage_workspace > > > > > > > > *With the following string returned from a database I get a problem:* > > > > 'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 > N\xd1' > > > > *When I try to display it it doesn't display correctly, I made an > > experiment with the same value in a python script and it worked after I > > returned the following script* > > > > u'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 > > N\xd1' > > > > *instead of just* > > > > 'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 > N\xd1' > > > > *How can I make it work? > > Could you tell us how you are reading the above string, e.g. > which column data type does the table have, are you using > Z SQL Methods to access the data, etc. ? > > Also: which database are you using and how exactly does the string > show up in the browser ? > > The data in your string appears to be Latin-1 encoded. Prepending > the "u" modifier to the string will have Python interpret it > as Unicode literal and thus have Zope convert the data to whatever > the page you're inserting the string into uses as encoding. > > If you try to insert the string as-is into, say, a UTF-8 encoded > page, then the browser will have problems displaying the mixture > of Latin-1 and UTF-8 data. > > In such a case, you have to explicitly convert the string data > into UTF-8 before inserting it into the page. > > Regards, > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Nov 27 2007) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > > :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: > > > eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 > D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg > Registered at Amtsgericht Duesseldorf: HRB 46611 > -- Jose Rivera Merla Vivir Con Intensidad Cada Instante, ?Que Otra Cosa Desear? Blog: http://unregiosonador.blogspot.com/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20071127/54e51a97/attachment.htm From jriveramerla at gmail.com Tue Nov 27 09:14:22 2007 From: jriveramerla at gmail.com (Jose Rivera Merla) Date: Tue Nov 27 16:14:34 2007 Subject: [egenix-users] Unicode problems with mxODBCZopeDA-1.0.10 In-Reply-To: <6f495610711270654h1065c3b3s778de4711e3ba577@mail.gmail.com> References: <6f495610711261630led14bau3a202e48fd85d2d6@mail.gmail.com> <474C0F0D.9060408@egenix.com> <6f495610711270654h1065c3b3s778de4711e3ba577@mail.gmail.com> Message-ID: <6f495610711270714q384c54c7x40bec56a54196385@mail.gmail.com> *I forgot to include that I display the string with * Espacio *where result comes from the Z SQL Method with the SQL command : *SELECT Espacio_Id, Espacio, Specs, isnull(POP,'.') Pop FROM CatalogoDeEspacios * and it displays:* XX a???? A?E?I?O?U?n? *instead of:* XX a? e? i? o? u? A? E? I? O? U? n? N? *Regards, Jose* On Nov 27, 2007 8:54 AM, Jose Rivera Merla wrote: > *Hi, here it is the info requested, > > DB: *MS SQL Server 2000 > *Table:*CatalogoDeEspacios > *4 Fields:* > espacio_id int no 4 10 0 no (n/a) (n/a) > NULL > *espacio * nvarchar no 510 yes (n/a) > (n/a) SQL_Latin1_General_CP1_CI_AS > specs nvarchar no 510 yes (n/a) > (n/a) SQL_Latin1_General_CP1_CI_AS > POP nvarchar no 510 yes (n/a) (n/a) > SQL_Latin1_General_CP1_CI_AS > > *I have the problems with the column espacio. > > And I return the data with a SQL Method, and when I found the poblem > started makeing tests with a python script, and thats why I detected that > specifing it as unicode (u'string') solved the problem, but can this be done > somewhere else so I don't have to do it for each column of characters? > > Regards, > Jose > * > > On Nov 27, 2007 6:35 AM, M.-A. Lemburg wrote: > > > On 2007-11-27 01:30, Jose Rivera Merla wrote: > > > *I am having problems displaying spanish accents like ?,?,?,? and ?. > > > > > > My setup is:* > > > > > > - Plone 3.0.3 > > > - CMF-2.1.0 > > > - Zope (Zope 2.10.5-final, python 2.4.4, win32) > > > - Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit > > > (Intel)] > > > - PIL 1.1.6 > > > > > > *and mxodbc:* > > > mxODBCZopeDA (Installed product mxODBCZopeDA > > > (mxODBCZopeDA-1.0.10))< > > http://fctcmty01:8080/Control_Panel/Products/mxODBCZopeDA/manage_workspace> > > > > > > > > > > > *With the following string returned from a database I get a problem:* > > > > > > 'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 > > N\xd1' > > > > > > *When I try to display it it doesn't display correctly, I made an > > > experiment with the same value in a python script and it worked after > > I > > > returned the following script* > > > > > > u'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 > > > > > N\xd1' > > > > > > *instead of just* > > > > > > 'XX a\xe1 e\xe9 i\xed o\xf3 u\xfa A\xc1 E\xc9 I\xcd O\xd3 U\xda n\xf1 > > N\xd1' > > > > > > *How can I make it work? > > > > Could you tell us how you are reading the above string, e.g. > > which column data type does the table have, are you using > > Z SQL Methods to access the data, etc. ? > > > > Also: which database are you using and how exactly does the string > > show up in the browser ? > > > > The data in your string appears to be Latin-1 encoded. Prepending > > the "u" modifier to the string will have Python interpret it > > as Unicode literal and thus have Zope convert the data to whatever > > the page you're inserting the string into uses as encoding. > > > > If you try to insert the string as-is into, say, a UTF-8 encoded > > page, then the browser will have problems displaying the mixture > > of Latin-1 and UTF-8 data. > > > > In such a case, you have to explicitly convert the string data > > into UTF-8 before inserting it into the page. > > > > Regards, > > -- > > Marc-Andre Lemburg > > eGenix.com > > > > Professional Python Services directly from the Source (#1, Nov 27 2007) > > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > > >>> mxODBC, mxDateTime, mxTextTools ... > > http://python.egenix.com/ > > ________________________________________________________________________ > > > > :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: > > > > > > > > eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 > > D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg > > Registered at Amtsgericht Duesseldorf: HRB 46611 > > > > > > -- > Jose Rivera Merla > Vivir Con Intensidad Cada Instante, ?Que Otra Cosa Desear? > Blog: http://unregiosonador.blogspot.com/index.html -- Jose Rivera Merla Vivir Con Intensidad Cada Instante, ?Que Otra Cosa Desear? Blog: http://unregiosonador.blogspot.com/index.html-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20071127/27c1844b/attachment.htm From support at egenix.com Tue Nov 27 20:07:31 2007 From: support at egenix.com (eGenix Support: Charlie Clark) Date: Tue Nov 27 20:07:53 2007 Subject: [egenix-users] Unicode problems with mxODBCZopeDA-1.0.10 In-Reply-To: <6f495610711270714q384c54c7x40bec56a54196385@mail.gmail.com> References: <6f495610711261630led14bau3a202e48fd85d2d6@mail.gmail.com> <474C0F0D.9060408@egenix.com> <6f495610711270654h1065c3b3s778de4711e3ba577@mail.gmail.com> <6f495610711270714q384c54c7x40bec56a54196385@mail.gmail.com> Message-ID: Am 27.11.2007, 16:14 Uhr, schrieb Jose Rivera Merla : > *I forgot to include that I display the string with > * tal:content="result/ESPACIO">Espacio > *where result comes from the Z SQL Method with the SQL command : Hi Jose, looking at that line it looks like you're hitting a bug in Zope 2.10's PageTemplates which should have been fixed in the 10.5 release - I don't know which Plone 3.0.3 is using. From experience there are two quick solutions: either explicitly decode your values using the .decode() method of your string objects: Espacio As this is a bit clumsy in a template you can use CMFDefault.utils.decode in a controlling script and everything correctly decoded. from Products.CMFDefault import decode options = {} options['results'] = results # ZSQL call return context.template_to_be_used(**decode(options)) This approach is preferable if you have lots of content that might need decoding or perhaps easier: use a string expression: Espacio Let us know how you get on. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 From support at egenix.com Tue Nov 27 20:11:53 2007 From: support at egenix.com (eGenix Support: Charlie Clark) Date: Tue Nov 27 20:12:34 2007 Subject: [egenix-users] Unicode problems with mxODBCZopeDA-1.0.10 In-Reply-To: <6f495610711270714q384c54c7x40bec56a54196385@mail.gmail.com> References: <6f495610711261630led14bau3a202e48fd85d2d6@mail.gmail.com> <474C0F0D.9060408@egenix.com> <6f495610711270654h1065c3b3s778de4711e3ba577@mail.gmail.com> <6f495610711270714q384c54c7x40bec56a54196385@mail.gmail.com> Message-ID: Am 27.11.2007, 16:14 Uhr, schrieb Jose Rivera Merla : > *I forgot to include that I display the string with > * tal:content="result/ESPACIO">Espacio > *where result comes from the Z SQL Method with the SQL command : Hi Jose, looking at that line it looks like you're hitting a bug in Zope 2.10's PageTemplates which should have been fixed in the 10.5 release - I don't know which Plone 3.0.3 is using. From experience there are two quick solutions: either explicitly decode your values using the .decode() method of your string objects: Espacio As this is a bit clumsy in a template you can use CMFDefault.utils.decode in a controlling script and everything correctly decoded. from Products.CMFDefault import decode options = {} options['results'] = results # ZSQL call return context.template_to_be_used(**decode(options)) This approach is preferable if you have lots of content that might need decoding or perhaps easier: use a string expression: Espacio Let us know how you get on. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 From jriveramerla at gmail.com Thu Nov 29 09:43:44 2007 From: jriveramerla at gmail.com (Jose Rivera Merla) Date: Thu Nov 29 16:43:52 2007 Subject: [egenix-users] Unicode problems with mxODBCZopeDA-1.0.10 In-Reply-To: References: <6f495610711261630led14bau3a202e48fd85d2d6@mail.gmail.com> <474C0F0D.9060408@egenix.com> <6f495610711270654h1065c3b3s778de4711e3ba577@mail.gmail.com> <6f495610711270714q384c54c7x40bec56a54196385@mail.gmail.com> Message-ID: <6f495610711290743u4b513c99lb1df05c0ab3e2b68@mail.gmail.com> *I solved the problem of display data with the following scheme:* DB Connection -> ZSQL Method -> Python Script -> Page Template In the Page Template I display data that comes from the python script. Inside the python script I used the decode('latin-1') for the varchar fields. *I now have the same problem but in reverse order, in a capture to change information the UPDATE command insert extrange characters instead of ?,?,i,?, or ?. What do I need to do in this case? * I find this annoying, I hope this get solved soon in the next releases of zope used by plone. Regards, Jose On Nov 27, 2007 1:11 PM, eGenix Support: Charlie Clark wrote: > Am 27.11.2007, 16:14 Uhr, schrieb Jose Rivera Merla > : > > > *I forgot to include that I display the string with > > * > tal:content="result/ESPACIO">Espacio > > *where result comes from the Z SQL Method with the SQL command : > > Hi Jose, > > looking at that line it looks like you're hitting a bug in Zope 2.10's > PageTemplates which should have been fixed in the 10.5 release - I don't > know which Plone 3.0.3 is using. > > From experience there are two quick solutions: either explicitly decode > your values using the .decode() method of your string objects: > > Espacio > > As this is a bit clumsy in a template you can use CMFDefault.utils.decode > in a controlling script and everything correctly decoded. > > from Products.CMFDefault import decode > > options = {} > options['results'] = results # ZSQL call > > return context.template_to_be_used(**decode(options)) > > This approach is preferable if you have lots of content that might need > decoding > > or perhaps easier: use a string expression: > > Espacio > > Let us know how you get on. > > Charlie > > -- > Charlie Clark > eGenix.com > > Professional Python Services directly from the Source > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > > :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: > > eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 > D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg > Registered at Amtsgericht Duesseldorf: HRB 46611 > -- Jose Rivera Merla Vivir Con Intensidad Cada Instante, ?Que Otra Cosa Desear? Blog: http://unregiosonador.blogspot.com/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20071129/159dee1f/attachment.htm From jriveramerla at gmail.com Thu Nov 29 11:19:02 2007 From: jriveramerla at gmail.com (Jose Rivera Merla) Date: Thu Nov 29 18:19:10 2007 Subject: [egenix-users] Unicode problems with mxODBCZopeDA-1.0.10 In-Reply-To: <6f495610711290743u4b513c99lb1df05c0ab3e2b68@mail.gmail.com> References: <6f495610711261630led14bau3a202e48fd85d2d6@mail.gmail.com> <474C0F0D.9060408@egenix.com> <6f495610711270654h1065c3b3s778de4711e3ba577@mail.gmail.com> <6f495610711270714q384c54c7x40bec56a54196385@mail.gmail.com> <6f495610711290743u4b513c99lb1df05c0ab3e2b68@mail.gmail.com> Message-ID: <6f495610711290919u101a1d55q228af218d7879b41@mail.gmail.com> *Hi, *I now have the same problem but in reverse order In WEB I have a form where the information is changed and the SQL UPDATE command insert extrange characters instead of ?,?,i,?, or ?. What do I need to do in this case? request.NombreDeCampo.encode('latin-1') does not work I find this annoying, I hope this get solved soon in the next releases of zope used by plone. * Regards, Jose * -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20071129/2fc20390/attachment.htm From support at egenix.com Fri Nov 30 12:27:36 2007 From: support at egenix.com (eGenix Support: Charlie Clark) Date: Fri Nov 30 12:27:40 2007 Subject: [egenix-users] Unicode problems with mxODBCZopeDA-1.0.10 In-Reply-To: <6f495610711290743u4b513c99lb1df05c0ab3e2b68@mail.gmail.com> References: <6f495610711261630led14bau3a202e48fd85d2d6@mail.gmail.com> <474C0F0D.9060408@egenix.com> <6f495610711270654h1065c3b3s778de4711e3ba577@mail.gmail.com> <6f495610711270714q384c54c7x40bec56a54196385@mail.gmail.com> <6f495610711290743u4b513c99lb1df05c0ab3e2b68@mail.gmail.com> Message-ID: Am 29.11.2007, 16:43 Uhr, schrieb Jose Rivera Merla : > *I solved the problem of display data with the following scheme:* > DB Connection -> ZSQL Method -> Python Script -> Page Template > In the Page Template I display data that comes from the python script. > Inside the python script I used the decode('latin-1') for the varchar > fields. > *I now have the same problem but in reverse order, in a capture to change > information the UPDATE command insert extrange characters instead of > ?,?,i,?, or ?. > request.NombreDeCampo.encode('latin-1') does not work This won't work directly in an SQL method because these only accept operations on DTML variables I think the syntax is something like but it could be more exotic. Anyway this would leave you wide open to SQL injection. Much better to pass the form into a script, do your encoding and call the SQL method from the script passing the variables via . Alternatively with mxODBC you can pass everything to an ExternalMethod where you won't need to worry about encoding. > What do I need to do in this case? * > I find this annoying, I hope this get solved soon in the next releases of > zope used by plone. Highly unlikely I think. But the next release of the mxODBC Zope DA will allow you set encoding and charsets directly on Zope DA connections. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611