<br><br><div class="gmail_quote">On Wed, Feb 16, 2011 at 11:04 AM, Adam GROSZER <span dir="ltr"><<a href="mailto:agroszer.ll@gmail.com">agroszer.ll@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<div class="im"><br>
On Tue, 15 Feb 2011 18:27:46 +0100 you wrote:<br>
><br>
><br>
> On Tue, Feb 15, 2011 at 6:11 PM, Tres Seaver <<a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a><br>
</div><div class="im">> <mailto:<a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a>>> wrote:<br>
><br>
> -----BEGIN PGP SIGNED MESSAGE-----<br>
> Hash: SHA1<br>
><br>
> On 02/15/2011 12:06 PM, Tres Seaver wrote:<br>
> > On 02/15/2011 11:37 AM, Chris Fanning wrote:<br>
> >> On Tue, Feb 15, 2011 at 5:16 PM, Adam GROSZER<br>
</div><div><div></div><div class="h5">> <<a href="mailto:agroszer@gmail.com">agroszer@gmail.com</a> <mailto:<a href="mailto:agroszer@gmail.com">agroszer@gmail.com</a>>> wrote:<br>
> ><br>
> >>> Hello,<br>
> >>><br>
> >>> You got to use python 2.6, at least for zodbupdate.<br>
> >>><br>
> >>><br>
> >> Thanks. I'd managed to get it going with 2.5 but I was getting this<br>
> >> warning..<br>
> ><br>
> >> Warning: Missing factory for Persistence PersistentMapping<br>
> ><br>
> >> Now, using python 2.6, I'm still getting the same warning.<br>
> >> Looks like I need to get this missing factory because the<br>
> resulting zodb.fs<br>
> >> still gives the same error<br>
> >> AttributeError: 'PersistentMapping' object has no attribute<br>
> 'has_key'<br>
> ><br>
> >> How do I install/configure this?<br>
> ><br>
> > You need to make the class importable at the "old" location in<br>
> order to<br>
> > use instances of that class to convert to the new location.<br>
> Something<br>
> > like::<br>
> ><br>
> > import persistent.mapping<br>
> > import sys<br>
> > sys.modules['Persistence.PersistentMapping'] = \<br>
> > sys.modules['persistent.mapping']<br>
> ><br>
> > Then you should be able toload you old 'pages' object and create<br>
> a new<br>
> > one (using the new class) and copy the contents into it from the<br>
> old one.<br>
><br>
> Actually, you can install the 'Persistence' package directly (it is<br>
> distributed separately from Zope):<br>
><br>
> <a href="http://pypi.python.org/pypi/Persistence" target="_blank">http://pypi.python.org/pypi/Persistence</a><br>
><br>
><br>
> Thankyou both,<br>
><br>
> I've can load the database now.<br>
><br>
<br>
</div></div>Or use the rename rules feature of zodbupdate something like this:<br>
<br>
renames = {'persistent.mapping PersistentMapping':<br>
'Persistence PersistentMapping'}<br>
<br>
<br></blockquote><div><br>Thanks a lot guys, this is working now.<br><br>I had to add def __new__ to a couple of classes, and change get_transaction().commit() to transaction.commit()<br>and that has been all. everything seems to be going fine.<br>
real users will be using it next week so that'll be the test.<br><br>Cherrs,<br>Chris.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
--<br>
Best regards,<br>
Adam GROSZER<br>
<font color="#888888">--<br>
Quote of the day:<br>
I intend to live forever. So far, so good<br>
- Stephen Wright<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
For more information about ZODB, see the ZODB Wiki:<br>
<a href="http://www.zope.org/Wikis/ZODB/" target="_blank">http://www.zope.org/Wikis/ZODB/</a><br>
<br>
ZODB-Dev mailing list - <a href="mailto:ZODB-Dev@zope.org">ZODB-Dev@zope.org</a><br>
<a href="https://mail.zope.org/mailman/listinfo/zodb-dev" target="_blank">https://mail.zope.org/mailman/listinfo/zodb-dev</a><br>
</div></div></blockquote></div><br>