New issue 70 by davydany: Running mirror-ddl throws 2 Errors
http://code.google.com/p/contentmirror/issues/detail?id=70
What steps will reproduce the problem?
1. Checkout ContentMirror from Source
2. Add to buildout.cfg and install it
3. Add appropriate configuration to settings.zcml
4. Call "./bin/instance run ./bin/mirror-ddl mysql > mirror.sql"
What is the expected output? What do you see instead?
Expected Output: create mirror.sql with the schema for the database
2 Exceptions is thrown, instead. Please view this:
http://pastebin.com/F2zbHwEc
What version of the product are you using? On what operating system?
1. Ubuntu 10.04 - Desktop
2. Plone 3.3.5
3. ContentMirror latest from SVN
Please provide any additional information below.
My fix:
I modified ore.contentmirror/ore/contentmirror/peer.py (starting from line
43):
FROM:
if self.transformer.table:
# unit tests exercise a custom transformer without a table.
join_clause = (
self.transformer.table.c.content_id == \
schema.content.c.content_id)
else:
join_clause = None
TO:
try: # ADDED BY DAVYDANY
if self.transformer.table:
# unit tests exercise a custom transformer without a table.
join_clause = (
self.transformer.table.c.content_id == \
schema.content.c.content_id)
else:
join_clause = None
except: # ADDED BY DAVYDANY
join_clause = None # ADDED BY DAVYDANY
I modified ore.contentmirror/ore/contentmirror/ddl.py (line 53):
FROM:
ddl = statement + parameters
TO:
ddl = str(statement) + parameters
So far it hasn't caused any problems, but it seems like very simple bugs to
fix.
This issue can be resolved by downgrading sqlalchemy to 0.5.8.
Installing contentmirror through buildout will install a sqlalchemy of
0.6.x. there were some changes in sqlalchemy going from 0.5.x to 0.6.x
that, i beleive, make it incompatible with zope.sqlalchemy-0.5-py2.4.egg.
The error you've encountered will show up again in other places if you do
not revert to 0.5.8.
Yes, I used 0.5.8, and it works fine.
Comment #3 on issue 70 by kapilt: Running mirror-ddl throws 2 Errors
http://code.google.com/p/contentmirror/issues/detail?id=70
0.6.0-rc3 was released with an explicit version pin to sqlalchemy 0.5.8 in
setup.py.