[Product-Developers] Re: Need Help with External Method

Mark Phillips mark at phillipsmarketing.biz
Wed Sep 2 13:21:08 UTC 2009


Thanks!

I added Bug #423171: <https://bugs.launchpad.net/bugs/423171>

to Zope 2.

Cheers!

Mark

On Wed, Sep 2, 2009 at 12:22 AM, Maurits van Rees <
m.van.rees at zestsoftware.nl> wrote:

> Mark Phillips, on 2009-09-02:
> >
> > Maurits,
> >
> > Thanks for the pointer...I forgot about how the error log filters out
> > certain errors.
> >
> > The error said that it could not find the method in my python file. Well,
> it
> > is there. Then I realized I was cutting and pasting the ID, method name,
> > etc. from the ahs site to the ahs_dev site. I inadvertently added a
> trailing
> > space, so the method could not be found. I would call this a bug, since I
> > believe a method name in python cannot have a trailing (or leading)
> spaces.
> > In the traceback below, and you can see the trailing space in the method
> > name that was picked up by the add external method form:
> >
> > Traceback (innermost last):
> >   Module ZPublisher.Publish, line 115, in publish
> >   Module ZPublisher.mapply, line 88, in mapply
> >   Module ZPublisher.Publish, line 41, in call_object
> >   Module Products.ExternalMethod.ExternalMethod, line 59, in
> > manage_addExternalMethod
> >   Module Products.ExternalMethod.ExternalMethod, line 111, in __init__
> >   Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit
> >   Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction
> >   Module App.Extensions, line 158, in getObject
> >    - __traceback_info__:
> >
> ('/opt/Plone-2.5.5/zeocluster/client1/Extensions/WorkflowEmailScripts.py',
> > 'WorkflowEmailScripts')
> > NotFound: The specified object, <em>edit_new_content </em>, was not
> > found in module, <em>WorkflowEmailScripts</em>.
> >
> > If my understanding of python is correct, shouldn't
> manage_addExternalMethod
> > stip off leading and trailing white space from the id, title, module, and
> > function names passed into the method? In ExternalMethod,
> > manage_addExternalMethod does this:
> >     id=str(id)
> >     title=str(title)
> >     module=str(module)
> >     function=str(function)
> >
> > should it be?
> >     id=str(id).strip()
> >     title=str(title).strip()
> >     module=str(module).strip()
> >     function=str(function).strip()
>
> Such a change would make sense for me.
>
> > Thanks again for shining a light on an otherwise murky road to
> > understanding! How would I submit a bug report, if you think there is a
> bug
> > here. Just a newbie trying to give back.
>
> Products.ExternalMethod is part of Zope 2.  The tracker for that is on
> launchpad: https://bugs.launchpad.net/zope2/
>
> --
> Maurits van Rees | http://maurits.vanrees.org/
>            Work | http://zestsoftware.nl/
> "This is your day, don't let them take it away." [Barlow Girl]
>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> http://lists.plone.org/mailman/listinfo/product-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20090902/d60196ca/attachment.html>


More information about the Product-Developers mailing list