Issue 70 in contentmirror: Running mirror-ddl throws 2 Errors

2 views
Skip to first unread message

conten...@googlecode.com

unread,
Jul 12, 2010, 1:03:43 AM7/12/10
to conten...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

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.

conten...@googlecode.com

unread,
Jul 22, 2010, 2:24:26 PM7/22/10
to conten...@googlegroups.com

Comment #1 on issue 70 by frenchforthe: Running mirror-ddl throws 2 Errors
http://code.google.com/p/contentmirror/issues/detail?id=70

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.

conten...@googlecode.com

unread,
Jul 22, 2010, 2:44:38 PM7/22/10
to conten...@googlegroups.com

Comment #2 on issue 70 by davydany: Running mirror-ddl throws 2 Errors
http://code.google.com/p/contentmirror/issues/detail?id=70

Yes, I used 0.5.8, and it works fine.

conten...@googlecode.com

unread,
Jul 28, 2010, 8:37:40 AM7/28/10
to conten...@googlegroups.com
Updates:
Status: Fixed
Labels: Milestone-Release0.6

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.

Reply all
Reply to author
Forward
0 new messages