7 Apr
2005
7 Apr
'05
6:50 p.m.
Wladmir Araujo Chapetta wrote at 2005-4-6 17:58 -0300:
... line 36, in Container searchService=ExternalMethod('searchService','searchService','search','search') TypeError: 'module' object is not callable
A nice and precise error message: "ExternalMethod" is the module and not the class (as you expect). And the module is not callable. Try: from Products.ExternalMethod.ExternalMethod import ExternalMethod Note that after this change, your code above will only work when "search.py" is located in your global "Extensions" folder. For product specific ExternalMethods, they usually are better located in the product's "Extensions" folder. In this case, the module spec must take the form "product.module". -- Dieter