[Moin-user] 'NoneType' object is not callable trying to use plugins
Brian J. Murrell
brian at interlinx.bc.ca
Sat Jul 10 20:39:05 EDT 2004
I have been trying to use some plugins, most recently the trivial ticket
system (Ticket.py) that Brian posted here a few days ago and I keep
getting the following:
TypeError: 'NoneType' object is not callable
Please include this information in your bug reports!:
Python 2.3.3 (#2, Feb 17 2004, 11:45:40) [GCC 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)] - /usr/bin/python
Linux linux.interlinx.bc.ca 2.6.3-4mdk #1 Tue Mar 2 07:26:13 CET 2004 i686
MoinMoin Release 1.1 [Revision 1.178]
A problem occurred while running a Python script. Here is the sequence of function calls leading up to the error, with the most recent (innermost) call first. The exception attributes are:
__doc__ = 'Inappropriate argument type.'
__getitem__ = <bound method TypeError.__getitem__ of <exceptions.TypeError instance at 0x40615a8c>>
__init__ = <bound method TypeError.__init__ of <exceptions.TypeError instance at 0x40615a8c>>
__module__ = 'exceptions'
__str__ = <bound method TypeError.__str__ of <exceptions.TypeError instance at 0x40615a8c>>
args = ("'NoneType' object is not callable",)
/usr/lib/python2.3/site-packages/MoinMoin/wikimacro.py in execute_external_macro(macro_name='Ticket', function='execute', args=(<MoinMoin.wikimacro.Macro instance>, 'open'))
76 if macro_name in plugin_macros:
77 execute = pysupport.importPlugin(_plugins, "MoinMoin.plugin.macro", macro_name, function)
78 return execute(*args)
execute = None, args = (<MoinMoin.wikimacro.Macro instance>, 'open')
79
80 raise ImportError("Cannot load macro %s" % macro_name)
/usr/lib/python2.3/site-packages/MoinMoin/wikimacro.py in execute(self=<MoinMoin.wikimacro.Macro instance>, macro_name='Ticket', args='open')
109 return ''
110
111 return execute_external_macro(macro_name, "execute", (self, args))
global execute_external_macro = <function execute_external_macro>, macro_name = 'Ticket', self = <MoinMoin.wikimacro.Macro instance>, args = 'open'
112
113 def _macro_TitleSearch(self, args):
/usr/lib/python2.3/site-packages/MoinMoin/parser/wiki.py in _macro_repl(self=<MoinMoin.parser.wiki.Parser instance>, word='[[Ticket(open)]]')
702
703 # call the macro
704 return self.macro.execute(macro_name, args)
self = <MoinMoin.parser.wiki.Parser instance>, global macro = undefined, global execute = undefined, macro_name = 'Ticket', args = 'open'
705
706
/usr/lib/python2.3/site-packages/MoinMoin/parser/wiki.py in replace(self=<MoinMoin.parser.wiki.Parser instance>, match=<_sre.SRE_Match object>)
813 return self.highlight_text(hit)
814 else:
815 return getattr(self, '_' + type + '_repl')(hit)
global getattr = undefined, self = <MoinMoin.parser.wiki.Parser instance>, type = 'macro', hit = '[[Ticket(open)]]'
816 else:
817 import pprint
/usr/lib/python2.3/sre.py in subn(pattern=<_sre.SRE_Pattern object>, repl=<bound method Parser.replace of <MoinMoin.parser.wiki.Parser instance at 0x406051ac>>, string='[[Ticket(open)]] ', count=0)
149 string by the replacement repl. number is the number of
150 substitutions that were made."""
151 return _compile(pattern, 0).subn(repl, string, count)
global _compile = <function _compile>, pattern = <_sre.SRE_Pattern object>, global subn = <function subn>, repl = <bound method Parser.replace of <MoinMoin.parser.wiki.Parser instance at 0x406051ac>>, string = '[[Ticket(open)]] ', count = 0
152
153 def split(pattern, string, maxsplit=0):
/usr/lib/python2.3/site-packages/MoinMoin/parser/wiki.py in format(self=<MoinMoin.parser.wiki.Parser instance>, formatter=<MoinMoin.formatter.text_html.Formatter instance>)
937 self.request.write(self.highlight_scan(scan_re, line))
938 else:
939 line, count = re.subn(scan_re, self.replace, line)
line = '[[Ticket(open)]] ', count = 1, global re = <module 're' from '/usr/lib/python2.3/re.pyc'>, global subn = undefined, scan_re = <_sre.SRE_Pattern object>, self = <MoinMoin.parser.wiki.Parser instance>, global replace = undefined
940 ##if not count: self._check_p()
941 self._check_p()
/usr/lib/python2.3/site-packages/MoinMoin/Page.py in send_page(self=<MoinMoin.Page.Page instance>, request=<MoinMoin.request.Request instance>, msg='', **keywords={'count_hit': 1})
477 else:
478 # parse the text and send the page content
479 Parser(body, request).format(self.formatter)
Parser = <class MoinMoin.parser.wiki.Parser>, body = 'Describe MyPage here.\n\nThis is MyPage.\n\n[[Ticket(open)]]\n', request = <MoinMoin.request.Request instance>, global format = undefined, self = <MoinMoin.Page.Page instance>, global formatter = undefined
480
481 # check for pending footnotes
/usr/lib/python2.3/site-packages/MoinMoin/cgimain.py in run(properties={})
210 else:
211 try:
212 cgitb.handler()
cgitb = <module 'MoinMoin.support.cgitb' from '/usr/lib/python2.3/site-packages/MoinMoin/support/cgitb.pyc'>, handler = undefined
213 except:
214 cgi.print_exception(*saved_exc)
Unfortunately I don't (yet) know enough Python to figure out what this
problem is.
Any ideas?
Thanx,
b.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/moin-user/attachments/20040710/e1af0ad5/attachment.sig>
More information about the Moin-user
mailing list