Zope 2.7 Problem w/Value Error: unpack list of wrong size
I am getting the following error while trying to add a ZClass programmatically with proxy set to manger: Traceback (innermost last): Module ZPublisher.Publish, line 100, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module OFS.DTMLMethod, line 130, in __call__ - <DTMLMethod instance at b30e6620> - URL: http://localhost:8080/register/addUser/manage_main - Physical Path: /register/addUser Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_Util, line 201, in eval - __traceback_info__: UserFileFolder_add Module <string>, line 1, in <expression> Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.PythonScripts.PythonScript, line 318, in _exec Module None, line 3, in UserFileFolder_add - <PythonScript at /Users/UserFolders/UserFileFolder_add> - Line 3 Module AccessControl.Owned, line 123, in getWrappedOwner ValueError: unpack list of wrong size Here is the dtml: <dtml-with "Users.UserFolders.manage_addProduct['UserFileFolder']"> <dtml-call "UserFileFolder_add(redirect=0)"></dtml-with> I can manually add with no problems. Any ideas?? Chris
Chris Bruce wrote:
I can manually add with no problems. Any ideas??
Not wishing to be unhelpful, but your best bet is not to use ZClasses... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
I can manually add with no problems. Any ideas?? Not wishing to be unhelpful, but your best bet is not to use ZClasses...
Absolutely true in the long term. In the short term, three people (including me) stumbled on this issue and must deal with it in the short term. I don't think that anyone uses ZClasses for new jobs. Old sites unfortunately use them. Rewrite them to products may be expensive time-wise. How can I charge my clients for a rewrite that brings no new funtions? That's not a rhetorical question. Please tell me and I start removing ZClasses from an old project and charging my customer for it. -- Milos Prudek
At 11:25 AM 3/25/2004 +0100, Milos Prudek wrote:
I don't think that anyone uses ZClasses for new jobs. Old sites unfortunately use them. Rewrite them to products may be expensive time-wise. How can I charge my clients for a rewrite that brings no new funtions? That's not a rhetorical question. Please tell me and I start removing ZClasses from an old project and charging my customer for it.
Basic upselling, Milos. What follows are silly versions, but wrapping new functionality around upgrades is a time honored approach to consulting/services. Upselling 101. "You've always wanted to be able to have Feature X with your website, and now for only 1800 silveros more, we can solve this problem and offer you Features V, W, and X as a package. Not only that, this upgrade will set you on the path toward adding Features Y and Z in a cost-effective manner, features you've only dreamed about before this. This is truly a step toward your fuller vision of the potential of this project." Upselling 102: Good News, Bad News approach. "Well, the problem here is in the plumbing. As time goes on and upgrades to other parts of the plumbing have taken place for security and performance issues, these older parts of the website are less well connected, less maintainable, less compatible with the rest of the plumbing. We're going to have to replace them with shiny new Python code if we're going to build toward your future in an appropriate fashion. That's the bad news, and it will cost 2000 silveros and take us about 3 weeks for full implementation, testing, etc. The good news is that with this upgrade complete, this also provides us with many new piping, new capabilities that will allow us to add some of the functionality you've been considering at a discount. We propose adding Features W, V and X at the same time, for only 500 silveros more. What? How can we do that so cheaply? Because, adding those Features while we're in there working on the plumbing allows us to save programming time. In fact we can add Feature Y now for just 750 silveros more, and that will allow us to add Feature Z too, whenever you're ready." Good luck. =Paul
programming time. In fact we can add Feature Y now for just 750 silveros more, and that will allow us to add Feature Z too, whenever you're ready."
Wow. This is cool. I learned something today. Honestly, thank you very much. -- Milos Prudek
programming time. In fact we can add Feature Y now for just 750 silveros more, and that will allow us to add Feature Z too, whenever you're ready."
Wow. This is cool. I learned something today. Honestly, thank you very much.
This is one of the rare cases when the world of programming and the world of marketing collide and don't just cause grief for the programming side :) jens
At 08:00 AM 3/25/2004, Jens Vagelpohl wrote:
programming time. In fact we can add Feature Y now for just 750 silveros more, and that will allow us to add Feature Z too, whenever you're ready."
Wow. This is cool. I learned something today. Honestly, thank you very much.
This is one of the rare cases when the world of programming and the world of marketing collide and don't just cause grief for the programming side :)
Yes, which is all too unfortunate. "Getting to Yes" in marketing amounts to determining what the customer truly wants, and then selling exactly that (or, what seems to be "exactly that"). As programmers/consultants, we need to make ourselves fully aware that what we create for a client/customer should meet their needs or solve their problems. When we can make OUR programming desires mesh with THEIR organizational needs, marketing becomes a simple extension of doing what we already do well. To do this well requires taking the time to fully understand what a customer really wants or needs, not just what they say they need. =Paul
Paul Howell wrote:
Yes, which is all too unfortunate. "Getting to Yes" in marketing amounts to determining what the customer truly wants, and then selling exactly that (or, what seems to be "exactly that"). As programmers/consultants, we need to make ourselves fully aware that what we create for a client/customer should meet their needs or solve their problems. When we can make OUR programming desires mesh with THEIR organizational needs, marketing becomes a simple extension of doing what we already do well. To do this well requires taking the time to fully understand what a customer really wants or needs, not just what they say they need.
FWIW, the sales methodology this woman came up with is pretty nifty: http://www.newsalesparadigm.com/ cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Milos Prudek wrote at 2004-3-25 11:25 +0100:
I can manually add with no problems. Any ideas?? Not wishing to be unhelpful, but your best bet is not to use ZClasses...
Absolutely true in the long term. In the short term, three people (including me) stumbled on this issue and must deal with it in the short term.
Your short term alternative is to fix the bug in Zope's security code. It handles unowned objects (like ZClasses) in the wrong way. A fix should not be difficult. -- Dieter
Chris Bruce wrote at 2004-3-24 14:03 -0800:
I am getting the following error while trying to add a ZClass programmatically with proxy set to manger: ... Module AccessControl.Owned, line 123, in getWrappedOwner ValueError: unpack list of wrong size
A bug in Zope 2.7's security code. The author had forgotten that there are unowned objects (such as ZClasses). The code breaks for unowned objects. Almost surely, it is easy to fix (look near line 123 of "AccessControl/Owned.py"). -- Dieter
Already fixed and posted to the Collector. Chris ----- Original Message ----- From: Dieter Maurer To: Chris Bruce Cc: zope@zope.org Sent: Saturday, March 27, 2004 2:29 AM Subject: Re: [Zope] Zope 2.7 Problem w/Value Error: unpack list of wrong size Chris Bruce wrote at 2004-3-24 14:03 -0800:
I am getting the following error while trying to add a ZClass programmatically with proxy set to manger: ... Module AccessControl.Owned, line 123, in getWrappedOwner ValueError: unpack list of wrong size
A bug in Zope 2.7's security code. The author had forgotten that there are unowned objects (such as ZClasses). The code breaks for unowned objects. Almost surely, it is easy to fix (look near line 123 of "AccessControl/Owned.py"). -- Dieter
Where is this in the Collector, Chris? I'm having trouble finding it. I'm still getting bit by this one (2.7.0 from earlier this month) with some older products using ZClasses... perhaps the fix never quite made it in to the released Zope? Meanwhile, I'll dive in and look for Dieter's almost surely easy to fix solution myself. Sort of like the old textbook saw, "The solution is left as an exercise for the reader." =Paul At 09:49 AM 3/27/2004 -0800, Chris Bruce wrote:
Already fixed and posted to the Collector.
Chris
----- Original Message ----- From: Dieter Maurer To: Chris Bruce Cc: zope@zope.org Sent: Saturday, March 27, 2004 2:29 AM Subject: Re: [Zope] Zope 2.7 Problem w/Value Error: unpack list of wrong size
Chris Bruce wrote at 2004-3-24 14:03 -0800:
I am getting the following error while trying to add a ZClass programmatically with proxy set to manger: ... Module AccessControl.Owned, line 123, in getWrappedOwner ValueError: unpack list of wrong size
A bug in Zope 2.7's security code.
The author had forgotten that there are unowned objects (such as ZClasses). The code breaks for unowned objects.
Almost surely, it is easy to fix (look near line 123 of "AccessControl/Owned.py").
-- Dieter
participants (6)
-
Chris Bruce -
Chris Withers -
Dieter Maurer -
Jens Vagelpohl -
Milos Prudek -
Paul Howell