[Zope] Pickle error and Zeo setup

2007-07-24 Thread Sudesh soni
BlankHi,

I am trying to update the 'SiteRootBase' in the secure.xml file and do import 
in zope , but I get error as shown in the screenshot.

I did same with secure.zexp and another error : cannot convert long int , i 
face when i import that file.

Why zope2.8.5 does not allow importing secure file after update.

I need to change /set the 'SiteRootBase' , is there any other way to achieve 
that?



Secondly I am setting up a ZEO server and I move the data.fs to ZEO storage 
location.

Q1. The data.fs I moved has SiteRootBase set to one of the zeo client URL.  I 
have another zeoclient which runs on a different URL/subdomain.
  As a result I see the same secure on another zeoclient ZMI, but as the 
SiteRootBase is set to the primary zeo client, Will this affect the request 
that will be diverted to the second zeo client ?

Q2. What settings I need to do to set up 2 zeo clients as I have one ZEO server 
running so that requests are properly served.  I am using mirroring feature 
from primary zeo client to divert request to another zeo client randomly.

Any help is appreciated in advance.

Regards
SuSon

<><>___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Declare constructor as public

2007-07-24 Thread Garito

No
If I try this the call don't work with users in normal acl_user folder,
isn't it?

The call works ok with users stored in the root acl_user

2007/7/24, Andrew Milton <[EMAIL PROTECTED]>:


+---[ Garito ]--
| Hi again!
| I detect some clues for the problem:
|
| I use ExUserFolder as acl_user for the website who raises this error
|
| The problem only raises if I'm authenticated as an user of the
ExUserFolder not
| if I'm authenticated as a root acl_user's user
|
| In both cases the user has manager as roles but the main acl_users works
ok and
| the XUF one raises the error
|
| Any idea?

Are you trying to store something as a property of the user? That's the
only
time XUF attempts to pickle anything.

--
Andrew Milton
[EMAIL PROTECTED]





--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Declare constructor as public

2007-07-24 Thread Garito

Sorry for the private message, Andrew
It seems like with the XUF user's roles don't work ok or something like this

2007/7/24, Andrew Milton <[EMAIL PROTECTED]>:


+---[ Garito ]--
| Hi again!
| I detect some clues for the problem:
|
| I use ExUserFolder as acl_user for the website who raises this error
|
| The problem only raises if I'm authenticated as an user of the
ExUserFolder not
| if I'm authenticated as a root acl_user's user
|
| In both cases the user has manager as roles but the main acl_users works
ok and
| the XUF one raises the error
|
| Any idea?

Are you trying to store something as a property of the user? That's the
only
time XUF attempts to pickle anything.

--
Andrew Milton
[EMAIL PROTECTED]





--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Declare constructor as public

2007-07-24 Thread Andrew Milton
+---[ Garito ]--
| Hi again!
| I detect some clues for the problem:
| 
| I use ExUserFolder as acl_user for the website who raises this error
| 
| The problem only raises if I'm authenticated as an user of the ExUserFolder 
not
| if I'm authenticated as a root acl_user's user
| 
| In both cases the user has manager as roles but the main acl_users works ok 
and
| the XUF one raises the error
| 
| Any idea?

Are you trying to store something as a property of the user? That's the only
time XUF attempts to pickle anything.

-- 
Andrew Milton
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Declare constructor as public

2007-07-24 Thread Garito

Hi, Jonathan!
Please, read my last message with the XUF consideration

Thanks!

2007/7/24, Jonathan <[EMAIL PROTECTED]>:



- Original Message -
From: "Garito" <[EMAIL PROTECTED]>
To: "Jonathan" <[EMAIL PROTECTED]>
Cc: 
Sent: Tuesday, July 24, 2007 11:47 AM
Subject: Re: [Zope] Re: Declare constructor as public


> Now the problem is with a manager user too (yesterday this user works
ok)
> I try to inspect the process to see where it fails but seems to be ok
> The error is raised when Zope try to commit the changes
>
> This is the traceback:
>
> Traceback (innermost last):
>  Module ZPublisher.Publish, line 121, in publish
>  Module Zope2.App.startup, line 240, in commit
>  Module transaction._manager, line 96, in commit
>  Module transaction._transaction, line 380, in commit
>  Module transaction._transaction, line 378, in commit
>  Module transaction._transaction, line 433, in _commitResources
>  Module ZODB.Connection, line 484, in commit
>  Module ZODB.Connection, line 526, in _commit
>  Module ZODB.Connection, line 553, in _store_objects
>  Module ZODB.serialize, line 407, in serialize
>  Module ZODB.serialize, line 416, in _dump
>  Module copy_reg, line 69, in _reduce_ex
> TypeError: can't pickle instancemethod objects

Somehow you are trying to store a method that has been bound to an
instance
of a class.  You should investigate the object that you are trying to
store
and see what it really consists of.

Jonathan





--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Declare constructor as public

2007-07-24 Thread Garito

Hi again!
I detect some clues for the problem:

I use ExUserFolder as acl_user for the website who raises this error

The problem only raises if I'm authenticated as an user of the ExUserFolder
not if I'm authenticated as a root acl_user's user

In both cases the user has manager as roles but the main acl_users works ok
and the XUF one raises the error

Any idea?

2007/7/24, Garito <[EMAIL PROTECTED]>:


Now the problem is with a manager user too (yesterday this user works ok)
I try to inspect the process to see where it fails but seems to be ok
The error is raised when Zope try to commit the changes

This is the traceback:

Traceback (innermost last):
  Module ZPublisher.Publish, line 121, in publish
  Module Zope2.App.startup, line 240, in commit
  Module transaction._manager, line 96, in commit
  Module transaction._transaction, line 380, in commit

  Module transaction._transaction, line 378, in commit
  Module transaction._transaction, line 433, in _commitResources
  Module ZODB.Connection, line 484, in commit
  Module ZODB.Connection, line 526, in _commit

  Module ZODB.Connection, line 553, in _store_objects
  Module ZODB.serialize, line 407, in serialize
  Module ZODB.serialize, line 416, in _dump
  Module copy_reg, line 69, in _reduce_ex
TypeError: can't pickle instancemethod objects



2007/7/24, Jonathan <[EMAIL PROTECTED]>:
>
>
> - Original Message -
> From: "Garito" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, July 24, 2007 10:44 AM
> Subject: Re: [Zope] Re: Declare constructor as public
>
>
> > Hi, J Cameron!
> > With constructor I mean the function I use to create the object. In
> this
> > case:
> > context.manage_addProduct['Yanged'].CrearYanged(NuevaId)
> >
> > CrearYanged
> >
> > How can I convert it to public?
>
> Make sure that the folder and the script that contains the
> "context.manage_addProduct['Yanged'].CrearYanged(NuevaId)" code are
> accessible to the user.
>
> Also, the folder where the new 'Yanged' instance is being created must
> be
> 'writeable' by the user.
>
> If it is not working, make sure that 'Unauthorized' is not listed in the
>
> 'Ignored exception types' list in your error_log, so you can track the
> problem down.
>
>
> Jonathan
>
>
>
>


--
Mis Cosas
http://blogs.sistes.net/Garito





--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Declare constructor as public

2007-07-24 Thread Jonathan


- Original Message - 
From: "Garito" <[EMAIL PROTECTED]>

To: "Jonathan" <[EMAIL PROTECTED]>
Cc: 
Sent: Tuesday, July 24, 2007 11:47 AM
Subject: Re: [Zope] Re: Declare constructor as public



Now the problem is with a manager user too (yesterday this user works ok)
I try to inspect the process to see where it fails but seems to be ok
The error is raised when Zope try to commit the changes

This is the traceback:

Traceback (innermost last):
 Module ZPublisher.Publish, line 121, in publish
 Module Zope2.App.startup, line 240, in commit
 Module transaction._manager, line 96, in commit
 Module transaction._transaction, line 380, in commit
 Module transaction._transaction, line 378, in commit
 Module transaction._transaction, line 433, in _commitResources
 Module ZODB.Connection, line 484, in commit
 Module ZODB.Connection, line 526, in _commit
 Module ZODB.Connection, line 553, in _store_objects
 Module ZODB.serialize, line 407, in serialize
 Module ZODB.serialize, line 416, in _dump
 Module copy_reg, line 69, in _reduce_ex
TypeError: can't pickle instancemethod objects


Somehow you are trying to store a method that has been bound to an instance 
of a class.  You should investigate the object that you are trying to store 
and see what it really consists of.


Jonathan 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Declare constructor as public

2007-07-24 Thread Garito

Now the problem is with a manager user too (yesterday this user works ok)
I try to inspect the process to see where it fails but seems to be ok
The error is raised when Zope try to commit the changes

This is the traceback:

Traceback (innermost last):
 Module ZPublisher.Publish, line 121, in publish
 Module Zope2.App.startup, line 240, in commit
 Module transaction._manager, line 96, in commit
 Module transaction._transaction, line 380, in commit
 Module transaction._transaction, line 378, in commit
 Module transaction._transaction, line 433, in _commitResources
 Module ZODB.Connection, line 484, in commit
 Module ZODB.Connection, line 526, in _commit
 Module ZODB.Connection, line 553, in _store_objects
 Module ZODB.serialize, line 407, in serialize
 Module ZODB.serialize, line 416, in _dump
 Module copy_reg, line 69, in _reduce_ex
TypeError: can't pickle instancemethod objects



2007/7/24, Jonathan <[EMAIL PROTECTED]>:



- Original Message -
From: "Garito" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, July 24, 2007 10:44 AM
Subject: Re: [Zope] Re: Declare constructor as public


> Hi, J Cameron!
> With constructor I mean the function I use to create the object. In this
> case:
> context.manage_addProduct['Yanged'].CrearYanged(NuevaId)
>
> CrearYanged
>
> How can I convert it to public?

Make sure that the folder and the script that contains the
"context.manage_addProduct['Yanged'].CrearYanged(NuevaId)" code are
accessible to the user.

Also, the folder where the new 'Yanged' instance is being created must be
'writeable' by the user.

If it is not working, make sure that 'Unauthorized' is not listed in the
'Ignored exception types' list in your error_log, so you can track the
problem down.


Jonathan







--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Declare constructor as public

2007-07-24 Thread Jonathan


- Original Message - 
From: "Garito" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, July 24, 2007 10:44 AM
Subject: Re: [Zope] Re: Declare constructor as public



Hi, J Cameron!
With constructor I mean the function I use to create the object. In this
case:
context.manage_addProduct['Yanged'].CrearYanged(NuevaId)

CrearYanged

How can I convert it to public?


Make sure that the folder and the script that contains the 
"context.manage_addProduct['Yanged'].CrearYanged(NuevaId)" code are 
accessible to the user.


Also, the folder where the new 'Yanged' instance is being created must be 
'writeable' by the user.


If it is not working, make sure that 'Unauthorized' is not listed in the 
'Ignored exception types' list in your error_log, so you can track the 
problem down.



Jonathan



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Declare constructor as public

2007-07-24 Thread Garito

Hi, J Cameron!
With constructor I mean the function I use to create the object. In this
case:
context.manage_addProduct['Yanged'].CrearYanged(NuevaId)

CrearYanged

How can I convert it to public?

Thanks!

2007/7/24, J Cameron Cooper <[EMAIL PROTECTED]>:


Garito wrote:
> Hi Andrew!
> In a normal method inside the product's class I use this:
> security = ClassSecurityInfo()
> security.setPermissionDefault('Freemind', ('Manager', 'Developer'))
> security.declareProtected ('Freemind', 'freemind')
>
> But outside the class I have no idea how to create security object
>
> Can I put a code like this outside the class?

No. Permission for a constructor is set when you register it, usually in
the __init__.py. (context.registerClass)

--jcc


> 2007/7/24, Andrew Milton
> <[EMAIL PROTECTED]
> >:
>
> +---[ Garito ]--
> | Hi all!
> |
> | How can I declare a product's constructor public?
> |
> | Thanks!
>
> You have to declare a permission first such as: "Add Garito Product"
> when you
> create your product, and register the class.
>
> Then in the ZMI you simply add the roles you want access to that
> permission.

--
Connexions
http://cnx.org

"Building Websites with Plone"
http://plonebook.packtpub.com

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )





--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Declare constructor as public

2007-07-24 Thread J Cameron Cooper

Garito wrote:

Hi Andrew!
In a normal method inside the product's class I use this:
security = ClassSecurityInfo()
security.setPermissionDefault('Freemind', ('Manager', 'Developer'))
security.declareProtected ('Freemind', 'freemind')

But outside the class I have no idea how to create security object

Can I put a code like this outside the class?


No. Permission for a constructor is set when you register it, usually in 
the __init__.py. (context.registerClass)


   --jcc


2007/7/24, Andrew Milton 
<[EMAIL PROTECTED] 
>:


+---[ Garito ]--
| Hi all!
|
| How can I declare a product's constructor public?
|
| Thanks!

You have to declare a permission first such as: "Add Garito Product"
when you
create your product, and register the class.

Then in the ZMI you simply add the roles you want access to that
permission.


--
Connexions
http://cnx.org

"Building Websites with Plone"
http://plonebook.packtpub.com

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ZODB FileStorage inspection tool: treenalyser

2007-07-24 Thread Pelletier Vincent
Hi.

I created a ZODB FileStorage inspection tool which originaly derived from 
netspace.py (as of zope 2.8.8). I was especially interested in actual object 
content, so this script offers the possibility to hex dump objects, and 
exports some more knobs (recursion depth, subtree selection, more verbosity 
levels) as parameters and adds some features (python-friendly path rendering, 
recursion depth error handled).
I removed the pack-before-use feature as I consider it out of place (packing 
considered a read-only operation doesn't mean it should be made available in 
every tool doing read-only operations...).

You can get it from the following SVN repository:

https://svn.erp5.org/public/erp5/trunk/utils/treenalyser.py

ViewVC available at:

http://svn.erp5.org/erp5/trunk/utils/treenalyser.py

-- 
Vincent Pelletier

PS: Yeah, its name is bad... Feel free to propose any better naming.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Declare constructor as public

2007-07-24 Thread Garito

Hi Andrew!
In a normal method inside the product's class I use this:
security = ClassSecurityInfo()
security.setPermissionDefault('Freemind', ('Manager', 'Developer'))
security.declareProtected('Freemind', 'freemind')

But outside the class I have no idea how to create security object

Can I put a code like this outside the class?

Thanks!

2007/7/24, Andrew Milton <[EMAIL PROTECTED]>:


+---[ Garito ]--
| Hi all!
|
| How can I declare a product's constructor public?
|
| Thanks!

You have to declare a permission first such as: "Add Garito Product" when
you
create your product, and register the class.

Then in the ZMI you simply add the roles you want access to that
permission.

--
Andrew Milton
[EMAIL PROTECTED]





--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Declare constructor as public

2007-07-24 Thread Andrew Milton
+---[ Garito ]--
| Hi all!
| 
| How can I declare a product's constructor public?
| 
| Thanks!

You have to declare a permission first such as: "Add Garito Product" when you
create your product, and register the class.

Then in the ZMI you simply add the roles you want access to that permission.

-- 
Andrew Milton
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Declare constructor as public

2007-07-24 Thread Garito

Hi all!

How can I declare a product's constructor public?

Thanks!

--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] IndexError

2007-07-24 Thread Jonathan


- Original Message - 
From: "kamal hamzat" <[EMAIL PROTECTED]>

To: 
Sent: Monday, July 23, 2007 10:54 PM
Subject: [Zope] IndexError


I am having IndexError in some of my folders when i tried to view the 
content of Zcatalog created in these folders, but to my surprise this is not 
happening in other folders with similar Zcatalog. I am also not experiencing 
the same problem with objects of the old Zcatalog that I have catalog before 
this error. In an attempt to correct this error, i had duplicated the old 
Zcatalog and renamed it. But once i catalog the objects and try to view it, 
it will show the IndexError again.


Traceback (innermost last):
 a.. Module ZPublisher.Publish, line 119, in publish
 b.. Module ZPublisher.mapply, line 88, in mapply
 c.. Module ZPublisher.Publish, line 42, in call_object
 d.. Module OFS.DTMLMethod, line 143, in __call__
 
 URL: http://www.news-online.com/politics/test/manage_main
 Physical Path:/news/politics/test
 e.. Module DocumentTemplate.DT_String, line 476, in __call__
 f.. Module DocumentTemplate.DT_In, line 676, in renderwob
 g.. Module AccessControl.ImplPython, line 191, in guarded_getitem
 h.. Module AccessControl.ZopeGuards, line 67, in guarded_getitem
 i.. Module Products.ZCatalog.Lazy, line 162, in __getitem__
IndexError: 1


This error occurs when the ZCatalog is trying to build a result set during a 
catalog search and an item in the catalog index cannot be added to the 
result set.  You may have a 'broken' object which was included in the 
catalog/index when you built (reindexed) the catalog (which may explain why 
your working/renamed catalog also failed).


Try looking at the objects you are adding to the catalog and see if any of 
them are invalid.  If you have a lot of items in the catalog you may have to 
write a python script to add the objects to the catalog, one-at-a-time, and 
test after the catalog after each object has been added in order to 
determine which object is causing the problem.


hth

Jonathan 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )