[egenix-users] Using mxODBC Zope DA 2.0 with Plone 4.1 (was: No module named threadlock?)

M.-A. Lemburg mal at egenix.com
Wed Aug 31 15:30:23 CEST 2011

Cliff Quinn wrote:
>> Please clear out the egg file from the cache and retry.
>> Hope that helps,
>  [Cliff Quinn] 
> So I cleared out everything from the Plone/buildout-cache/download/dist
> and the egenix folder from Plone/buildout-cache/eggs, and things seem
> better on the UCS front.
> Last problem I hope:
>   File "Products/mxODBCZopeDA/__init__.py", line 33, in <module>
>     def get_starter():
>   File "Products/mxODBCZopeDA/ZopeDA.py", line 351, in <module>
> ImportError: eGenix mxODBC Zope DA could not find license module
> In the zeo version of buildout there is no ${instance:location} value as
> recommended in your documentation for the 
> "output = ${instance:location}/lib/python/mxodbc_zopeda_license.py"
> line in the [egenix-mxodbc-zopeda-license] section. I tried using the
> ${buildout:directory} value instead, and this doesn't seem to work. I
> tried hard-coding the absolute path, and that didn't work. I noted that
> the products/lib/python directories were owned by root:root, and I
> chmoded them to plone:root, and that didn't work. Where exactly is the
> program looking?

In a ZEO setup, each client will have to get a license, so you need
multiple [egenix-mxodbc-zopeda-license] sections, one for each client.

Here's an example buildout.cfg file for a ZEO cluster with two
clients client1 and client2:

eggs =

parts =

find-links =

### Install the Zope instance licenses for egenix-mxodbc-zopeda

recipe = collective.recipe.template
input = /path-to-license-dir-for-client-1/mxodbc_zopeda_license.py
output = ${client1:location}/lib/python/mxodbc_zopeda_license.py

recipe = collective.recipe.template
input = /path-to-license-dir-for-client-2/mxodbc_zopeda_license.py
output = ${client2:location}/lib/python/mxodbc_zopeda_license.py

egenix-mxodbc-zopeda = 2.0.1
ThreadLock = 2.13.0
Products.ZSQLMethods = 2.13.4


Something I forgot earlier on: Please also make sure you pin down
the egenix-mxodbc-zopeda version in [versions]. I've added the
needed line to the above example.

With this setup, mxODBC Zope DA 2.0.1 will also run in Plone 4.1
using the default Python version that comes with Plone
(Python 2.6.6+ UCS2).

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Aug 31 2011)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
2011-10-04: PyCon DE 2011, Leipzig, Germany                34 days to go

::: Try our new mxODBC.Connect Python Database Interface 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

More information about the egenix-users mailing list