[Zope-dev] External Method Missery
Chris Withers
chrisw@nipltd.com
Wed, 12 Jul 2000 10:02:42 +0100
I think this is a bgu so I'll chuck it into the collector unless someone
tells me otherwise...
I have an external method called navTree (dtml-tree was too broken to
fix in the time frame :( ) with a spec as follows:
def navTree(self,start):
It's called in some DTML as:
<dtml-var "nav_tree(PARENTS[-2])">
which is fine, unless I call it with the following:
<dtml-var "nav_tree(start=PARENTS[-2])">
in which case I get:
TypeError: not enough arguments; expected 2, got 0
which is not very helpful :(
Any ideas?
cheers,
Chris
PS:
Traceback (innermost last):
File /mnt/data/2/zope/external/2-1-6/lib/python/ZPublisher/Publish.py,
line 214, in publish_module
File /mnt/data/2/zope/external/2-1-6/lib/python/ZPublisher/Publish.py,
line 179, in publish
File /mnt/data/2/zope/external/2-1-6/lib/python/Zope/__init__.py, line
202, in zpublisher_exception_hook
(Object: ElementWithAttributes)
File /mnt/data/2/zope/external/2-1-6/lib/python/ZPublisher/Publish.py,
line 165, in publish
File /mnt/data/2/zope/external/2-1-6/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: index_html)
File /mnt/data/2/zope/external/2-1-6/lib/python/ZPublisher/Publish.py,
line 102, in call_object
(Object: index_html)
File /mnt/data/2/zope/external/2-1-6/lib/python/OFS/DTMLMethod.py,
line 150, in __call__
(Object: index_html)
File
/mnt/data/2/zope/external/2-1-6/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: index_html)
File
/mnt/data/2/zope/external/2-1-6/lib/python/DocumentTemplate/DT_Util.py,
line 335, in eval
(Object: _[REQUEST['lang']])
(Info: REQUEST)
File <string>, line 0, in ?
File
/mnt/data/2/zope/external/2-1-6/lib/python/DocumentTemplate/DT_Util.py,
line 161, in careful_getitem
File /mnt/data/2/zope/external/2-1-6/lib/python/OFS/DTMLDocument.py,
line 162, in __call__
(Object: en)
File
/mnt/data/2/zope/external/2-1-6/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: en)
File /mnt/data/2/zope/external/2-1-6/lib/python/OFS/DTMLMethod.py,
line 146, in __call__
(Object: standard_html_header)
File
/mnt/data/2/zope/external/2-1-6/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: standard_html_header)
File /mnt/data/2/zope/external/2-1-6/lib/python/OFS/DTMLMethod.py,
line 146, in __call__
(Object: left_menu)
File
/mnt/data/2/zope/external/2-1-6/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: left_menu)
File
/mnt/data/2/zope/external/2-1-6/lib/python/DocumentTemplate/DT_Util.py,
line 335, in eval
(Object: nav_tree(start=PARENTS[-2]))
(Info: PARENTS)
File <string>, line 0, in ?
File
/mnt/data/2/zope/external/2-1-6/lib/python/Products/ExternalMethod/ExternalMethod.py,
line 248, in __call__
(Object: nav_tree)
(Info: ((), {'start': <Folder instance at 86d4de0>}, None))