<br><br><div class="gmail_quote">On Wed, Feb 16, 2011 at 11:04 AM, Adam GROSZER <span dir="ltr">&lt;<a href="mailto:agroszer.ll@gmail.com">agroszer.ll@gmail.com</a>&gt;</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>
&gt;<br>
&gt;<br>
&gt; On Tue, Feb 15, 2011 at 6:11 PM, Tres Seaver &lt;<a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a><br>
</div><div class="im">&gt; &lt;mailto:<a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     -----BEGIN PGP SIGNED MESSAGE-----<br>
&gt;     Hash: SHA1<br>
&gt;<br>
&gt;     On 02/15/2011 12:06 PM, Tres Seaver wrote:<br>
&gt;      &gt; On 02/15/2011 11:37 AM, Chris Fanning wrote:<br>
&gt;      &gt;&gt; On Tue, Feb 15, 2011 at 5:16 PM, Adam GROSZER<br>
</div><div><div></div><div class="h5">&gt;     &lt;<a href="mailto:agroszer@gmail.com">agroszer@gmail.com</a> &lt;mailto:<a href="mailto:agroszer@gmail.com">agroszer@gmail.com</a>&gt;&gt; wrote:<br>
&gt;      &gt;<br>
&gt;      &gt;&gt;&gt; Hello,<br>
&gt;      &gt;&gt;&gt;<br>
&gt;      &gt;&gt;&gt; You got to use python 2.6, at least for zodbupdate.<br>
&gt;      &gt;&gt;&gt;<br>
&gt;      &gt;&gt;&gt;<br>
&gt;      &gt;&gt; Thanks. I&#39;d managed to get it going with 2.5 but I was getting this<br>
&gt;      &gt;&gt; warning..<br>
&gt;      &gt;<br>
&gt;      &gt;&gt; Warning: Missing factory for Persistence PersistentMapping<br>
&gt;      &gt;<br>
&gt;      &gt;&gt; Now, using python 2.6, I&#39;m still getting the same warning.<br>
&gt;      &gt;&gt; Looks like I need to get this missing factory because the<br>
&gt;     resulting zodb.fs<br>
&gt;      &gt;&gt; still gives the same error<br>
&gt;      &gt;&gt; AttributeError: &#39;PersistentMapping&#39; object has no attribute<br>
&gt;     &#39;has_key&#39;<br>
&gt;      &gt;<br>
&gt;      &gt;&gt; How do I install/configure this?<br>
&gt;      &gt;<br>
&gt;      &gt; You need to make the class importable at the &quot;old&quot; location in<br>
&gt;     order to<br>
&gt;      &gt; use instances of that class to convert to the new location.<br>
&gt;       Something<br>
&gt;      &gt; like::<br>
&gt;      &gt;<br>
&gt;      &gt;  import persistent.mapping<br>
&gt;      &gt;  import sys<br>
&gt;      &gt;  sys.modules[&#39;Persistence.PersistentMapping&#39;] = \<br>
&gt;      &gt;         sys.modules[&#39;persistent.mapping&#39;]<br>
&gt;      &gt;<br>
&gt;      &gt; Then you should be able toload you old &#39;pages&#39; object and create<br>
&gt;     a new<br>
&gt;      &gt; one (using the new class) and copy the contents into it from the<br>
&gt;     old one.<br>
&gt;<br>
&gt;     Actually, you can install the &#39;Persistence&#39; package directly (it is<br>
&gt;     distributed separately from Zope):<br>
&gt;<br>
&gt;     <a href="http://pypi.python.org/pypi/Persistence" target="_blank">http://pypi.python.org/pypi/Persistence</a><br>
&gt;<br>
&gt;<br>
&gt; Thankyou both,<br>
&gt;<br>
&gt; I&#39;ve can load the database now.<br>
&gt;<br>
<br>
</div></div>Or use the rename rules feature of zodbupdate something like this:<br>
<br>
renames = {&#39;persistent.mapping PersistentMapping&#39;:<br>
            &#39;Persistence PersistentMapping&#39;}<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&#39;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>