Re: [ZODB-Dev] zodbupdate install problem

2011-02-16 Thread Adam GROSZER
Hello,

On Tue, 15 Feb 2011 18:27:46 +0100 you wrote:


 On Tue, Feb 15, 2011 at 6:11 PM, Tres Seaver tsea...@palladion.com
 mailto:tsea...@palladion.com wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 02/15/2011 12:06 PM, Tres Seaver wrote:
   On 02/15/2011 11:37 AM, Chris Fanning wrote:
   On Tue, Feb 15, 2011 at 5:16 PM, Adam GROSZER
 agros...@gmail.com mailto:agros...@gmail.com wrote:
  
   Hello,
  
   You got to use python 2.6, at least for zodbupdate.
  
  
   Thanks. I'd managed to get it going with 2.5 but I was getting this
   warning..
  
   Warning: Missing factory for Persistence PersistentMapping
  
   Now, using python 2.6, I'm still getting the same warning.
   Looks like I need to get this missing factory because the
 resulting zodb.fs
   still gives the same error
   AttributeError: 'PersistentMapping' object has no attribute
 'has_key'
  
   How do I install/configure this?
  
   You need to make the class importable at the old location in
 order to
   use instances of that class to convert to the new location.
   Something
   like::
  
import persistent.mapping
import sys
sys.modules['Persistence.PersistentMapping'] = \
   sys.modules['persistent.mapping']
  
   Then you should be able toload you old 'pages' object and create
 a new
   one (using the new class) and copy the contents into it from the
 old one.

 Actually, you can install the 'Persistence' package directly (it is
 distributed separately from Zope):

 http://pypi.python.org/pypi/Persistence


 Thankyou both,

 I've can load the database now.


Or use the rename rules feature of zodbupdate something like this:

renames = {'persistent.mapping PersistentMapping':
'Persistence PersistentMapping'}


-- 
Best regards,
  Adam GROSZER
--
Quote of the day:
I intend to live forever. So far, so good
- Stephen Wright
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] zodbupdate install problem

2011-02-16 Thread Chris Fanning
On Wed, Feb 16, 2011 at 11:04 AM, Adam GROSZER agroszer...@gmail.comwrote:

 Hello,

 On Tue, 15 Feb 2011 18:27:46 +0100 you wrote:
 
 
  On Tue, Feb 15, 2011 at 6:11 PM, Tres Seaver tsea...@palladion.com
  mailto:tsea...@palladion.com wrote:
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  On 02/15/2011 12:06 PM, Tres Seaver wrote:
On 02/15/2011 11:37 AM, Chris Fanning wrote:
On Tue, Feb 15, 2011 at 5:16 PM, Adam GROSZER
  agros...@gmail.com mailto:agros...@gmail.com wrote:
   
Hello,
   
You got to use python 2.6, at least for zodbupdate.
   
   
Thanks. I'd managed to get it going with 2.5 but I was getting
 this
warning..
   
Warning: Missing factory for Persistence PersistentMapping
   
Now, using python 2.6, I'm still getting the same warning.
Looks like I need to get this missing factory because the
  resulting zodb.fs
still gives the same error
AttributeError: 'PersistentMapping' object has no attribute
  'has_key'
   
How do I install/configure this?
   
You need to make the class importable at the old location in
  order to
use instances of that class to convert to the new location.
Something
like::
   
 import persistent.mapping
 import sys
 sys.modules['Persistence.PersistentMapping'] = \
sys.modules['persistent.mapping']
   
Then you should be able toload you old 'pages' object and create
  a new
one (using the new class) and copy the contents into it from the
  old one.
 
  Actually, you can install the 'Persistence' package directly (it is
  distributed separately from Zope):
 
  http://pypi.python.org/pypi/Persistence
 
 
  Thankyou both,
 
  I've can load the database now.
 

 Or use the rename rules feature of zodbupdate something like this:

 renames = {'persistent.mapping PersistentMapping':
'Persistence PersistentMapping'}



Thanks a lot guys, this is working now.

I had to add def __new__ to a couple of classes, and change
get_transaction().commit() to transaction.commit()
and that has been all. everything seems to be going fine.
real users will be using it next week so that'll be the test.

Cherrs,
Chris.


 --
 Best regards,
  Adam GROSZER
 --
 Quote of the day:
 I intend to live forever. So far, so good
 - Stephen Wright
 ___
 For more information about ZODB, see the ZODB Wiki:
 http://www.zope.org/Wikis/ZODB/

 ZODB-Dev mailing list  -  ZODB-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zodb-dev

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


[ZODB-Dev] zodbupdate install problem

2011-02-15 Thread Chris Fanning
Hi,

I've been using zodb as the database on a homebrew cms since 2004 without
one single problem. :)
Now we're changing hardware so we're upgrading software too.
I'm running into problems.

The client starts like this.

from Persistence import PersistentMapping
def __init__(self):
  .
  if not dbroot.has_key('pages'):
dbroot['pages'] = PersistentMapping()

So I changed the Persistence to
from persistent.mapping import PersistentMapping

And now I get the error
'PersistentMapping' object has no attribute 'has_key'

From what I understand the objects are Broken and I need to upgrade the
zodb.

So I did
#easy_install zodbupdate

However I get this error.

Running zodbupdate-0.5/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-iNI2JT/zodbupdate-0.5/egg-dist-tmp-AstNfF
  File build/bdist.linux-x86_64/egg/zodbupdate/serialize.py, line 165
symb = find_global(*symb_info, Broken=ZODBBroken)

I'm at a real loss here.
Any help please?

Chris.
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] zodbupdate install problem

2011-02-15 Thread Chris Fanning
On Tue, Feb 15, 2011 at 5:03 PM, Chris Fanning 
christopher.fann...@gmail.com wrote:

 Hi,

 I've been using zodb as the database on a homebrew cms since 2004 without
 one single problem. :)
 Now we're changing hardware so we're upgrading software too.
 I'm running into problems.

 The client starts like this.

 from Persistence import PersistentMapping
 def __init__(self):
   .
   if not dbroot.has_key('pages'):
 dbroot['pages'] = PersistentMapping()

 So I changed the Persistence to
 from persistent.mapping import PersistentMapping

 And now I get the error
 'PersistentMapping' object has no attribute 'has_key'

 From what I understand the objects are Broken and I need to upgrade the
 zodb.

 So I did
 #easy_install zodbupdate

 However I get this error.

 Running zodbupdate-0.5/setup.py -q bdist_egg --dist-dir
 /tmp/easy_install-iNI2JT/zodbupdate-0.5/egg-dist-tmp-AstNfF
   File build/bdist.linux-x86_64/egg/zodbupdate/serialize.py, line 165



symb = find_global(*symb_info, Broken=ZODBBroken)
 ^
SyntaxError: invalid syntax


 I'm at a real loss here.
 Any help please?

 Chris.

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] zodbupdate install problem

2011-02-15 Thread Adam GROSZER
Hello,

You got to use python 2.6, at least for zodbupdate.

On Tue, 15 Feb 2011 17:10:23 +0100 you wrote:



 On Tue, Feb 15, 2011 at 5:03 PM, Chris Fanning
 christopher.fann...@gmail.com mailto:christopher.fann...@gmail.com
 wrote:

 Hi,

 I've been using zodb as the database on a homebrew cms since 2004
 without one single problem. :)
 Now we're changing hardware so we're upgrading software too.
 I'm running into problems.

 The client starts like this.

 from Persistence import PersistentMapping
 def __init__(self):
.
if not dbroot.has_key('pages'):
  dbroot['pages'] = PersistentMapping()

 So I changed the Persistence to
 from persistent.mapping import PersistentMapping

 And now I get the error
 'PersistentMapping' object has no attribute 'has_key'

  From what I understand the objects are Broken and I need to upgrade
 the zodb.

 So I did
 #easy_install zodbupdate

 However I get this error.

 Running zodbupdate-0.5/setup.py -q bdist_egg --dist-dir
 /tmp/easy_install-iNI2JT/zodbupdate-0.5/egg-dist-tmp-AstNfF
File build/bdist.linux-x86_64/egg/zodbupdate/serialize.py, line 165


 symb = find_global(*symb_info, Broken=ZODBBroken)
   ^
 SyntaxError: invalid syntax


 I'm at a real loss here.
 Any help please?

 Chris.




 ___
 For more information about ZODB, see the ZODB Wiki:
 http://www.zope.org/Wikis/ZODB/

 ZODB-Dev mailing list  -  ZODB-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zodb-dev

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] zodbupdate install problem

2011-02-15 Thread Chris Fanning
On Tue, Feb 15, 2011 at 5:16 PM, Adam GROSZER agros...@gmail.com wrote:

 Hello,

 You got to use python 2.6, at least for zodbupdate.


Thanks. I'd managed to get it going with 2.5 but I was getting this
warning..

Warning: Missing factory for Persistence PersistentMapping

Now, using python 2.6, I'm still getting the same warning.
Looks like I need to get this missing factory because the resulting zodb.fs
still gives the same error
AttributeError: 'PersistentMapping' object has no attribute 'has_key'

How do I install/configure this?
Thanks.
Chris.



 On Tue, 15 Feb 2011 17:10:23 +0100 you wrote:
 
 
 
  On Tue, Feb 15, 2011 at 5:03 PM, Chris Fanning
  christopher.fann...@gmail.com mailto:christopher.fann...@gmail.com
  wrote:
 
  Hi,
 
  I've been using zodb as the database on a homebrew cms since 2004
  without one single problem. :)
  Now we're changing hardware so we're upgrading software too.
  I'm running into problems.
 
  The client starts like this.
 
  from Persistence import PersistentMapping
  def __init__(self):
 .
 if not dbroot.has_key('pages'):
   dbroot['pages'] = PersistentMapping()
 
  So I changed the Persistence to
  from persistent.mapping import PersistentMapping
 
  And now I get the error
  'PersistentMapping' object has no attribute 'has_key'
 
   From what I understand the objects are Broken and I need to upgrade
  the zodb.
 
  So I did
  #easy_install zodbupdate
 
  However I get this error.
 
  Running zodbupdate-0.5/setup.py -q bdist_egg --dist-dir
  /tmp/easy_install-iNI2JT/zodbupdate-0.5/egg-dist-tmp-AstNfF
 File build/bdist.linux-x86_64/egg/zodbupdate/serialize.py, line
 165
 
 
  symb = find_global(*symb_info, Broken=ZODBBroken)
^
  SyntaxError: invalid syntax
 
 
  I'm at a real loss here.
  Any help please?
 
  Chris.
 
 
 
 
  ___
  For more information about ZODB, see the ZODB Wiki:
  http://www.zope.org/Wikis/ZODB/
 
  ZODB-Dev mailing list  -  ZODB-Dev@zope.org
  https://mail.zope.org/mailman/listinfo/zodb-dev

 ___
 For more information about ZODB, see the ZODB Wiki:
 http://www.zope.org/Wikis/ZODB/

 ZODB-Dev mailing list  -  ZODB-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zodb-dev

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] zodbupdate install problem

2011-02-15 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/15/2011 11:37 AM, Chris Fanning wrote:
 On Tue, Feb 15, 2011 at 5:16 PM, Adam GROSZER agros...@gmail.com wrote:
 
 Hello,

 You got to use python 2.6, at least for zodbupdate.


 Thanks. I'd managed to get it going with 2.5 but I was getting this
 warning..
 
 Warning: Missing factory for Persistence PersistentMapping
 
 Now, using python 2.6, I'm still getting the same warning.
 Looks like I need to get this missing factory because the resulting zodb.fs
 still gives the same error
 AttributeError: 'PersistentMapping' object has no attribute 'has_key'
 
 How do I install/configure this?

You need to make the class importable at the old location in order to
use instances of that class to convert to the new location.  Something
like::

 import persistent.mapping
 import sys
 sys.modules['Persistence.PersistentMapping'] = \
sys.modules['persistent.mapping']

Then you should be able toload you old 'pages' object and create a new
one (using the new class) and copy the contents into it from the old one.


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1asnoACgkQ+gerLs4ltQ4zkwCgzodbX4J3d4Ig+bmk4Ld09k4j
c40AnA9bOnrromUUb4ZI8tgicIUAHHVp
=u1n2
-END PGP SIGNATURE-

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] zodbupdate install problem

2011-02-15 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/15/2011 12:06 PM, Tres Seaver wrote:
 On 02/15/2011 11:37 AM, Chris Fanning wrote:
 On Tue, Feb 15, 2011 at 5:16 PM, Adam GROSZER agros...@gmail.com wrote:
 
 Hello,

 You got to use python 2.6, at least for zodbupdate.


 Thanks. I'd managed to get it going with 2.5 but I was getting this
 warning..
 
 Warning: Missing factory for Persistence PersistentMapping
 
 Now, using python 2.6, I'm still getting the same warning.
 Looks like I need to get this missing factory because the resulting zodb.fs
 still gives the same error
 AttributeError: 'PersistentMapping' object has no attribute 'has_key'
 
 How do I install/configure this?
 
 You need to make the class importable at the old location in order to
 use instances of that class to convert to the new location.  Something
 like::
 
  import persistent.mapping
  import sys
  sys.modules['Persistence.PersistentMapping'] = \
 sys.modules['persistent.mapping']
 
 Then you should be able toload you old 'pages' object and create a new
 one (using the new class) and copy the contents into it from the old one.

Actually, you can install the 'Persistence' package directly (it is
distributed separately from Zope):

  http://pypi.python.org/pypi/Persistence


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1as8MACgkQ+gerLs4ltQ7yzgCeKxXGqx/EIhxfR2BWDtZnOWpF
qSoAn3T323/8RIS8wvYYRXmUX5n+lG2J
=dRWP
-END PGP SIGNATURE-

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] zodbupdate install problem

2011-02-15 Thread Chris Fanning
On Tue, Feb 15, 2011 at 6:11 PM, Tres Seaver tsea...@palladion.com wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 02/15/2011 12:06 PM, Tres Seaver wrote:
  On 02/15/2011 11:37 AM, Chris Fanning wrote:
  On Tue, Feb 15, 2011 at 5:16 PM, Adam GROSZER agros...@gmail.com
 wrote:
 
  Hello,
 
  You got to use python 2.6, at least for zodbupdate.
 
 
  Thanks. I'd managed to get it going with 2.5 but I was getting this
  warning..
 
  Warning: Missing factory for Persistence PersistentMapping
 
  Now, using python 2.6, I'm still getting the same warning.
  Looks like I need to get this missing factory because the resulting
 zodb.fs
  still gives the same error
  AttributeError: 'PersistentMapping' object has no attribute 'has_key'
 
  How do I install/configure this?
 
  You need to make the class importable at the old location in order to
  use instances of that class to convert to the new location.  Something
  like::
 
   import persistent.mapping
   import sys
   sys.modules['Persistence.PersistentMapping'] = \
  sys.modules['persistent.mapping']
 
  Then you should be able toload you old 'pages' object and create a new
  one (using the new class) and copy the contents into it from the old one.

 Actually, you can install the 'Persistence' package directly (it is
 distributed separately from Zope):

  http://pypi.python.org/pypi/Persistence


Thankyou both,

I've can load the database now.

Cheers,
Chris.




 Tres.
 - --
 ===
 Tres Seaver  +1 540-429-0999  tsea...@palladion.com
 Palladion Software   Excellence by Designhttp://palladion.com
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk1as8MACgkQ+gerLs4ltQ7yzgCeKxXGqx/EIhxfR2BWDtZnOWpF
 qSoAn3T323/8RIS8wvYYRXmUX5n+lG2J
 =dRWP
 -END PGP SIGNATURE-

 ___
 For more information about ZODB, see the ZODB Wiki:
 http://www.zope.org/Wikis/ZODB/

 ZODB-Dev mailing list  -  ZODB-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zodb-dev

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev