Attachment 'TestPage.html'

Download

--> -->

AttributeError

Formatter instance has no attribute 'doc'

If you want to report a bug, please save this page and attach it to your bug report.

Traceback

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

  1. /usr/local/lib/python2.4/site-packages/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_cgi.Request object>)

    1. 1309 self.page.send_page()
    2. 1310 else:
    3. 1311 handler(self.page.page_name, self)
    4. 1312
    5. 1313 # every action that didn't use to raise MoinMoinFinish must call this now:
    • handler = <function do_show>
    • self = <MoinMoin.request.request_cgi.Request object>
    • self.page = <MoinMoin.Page.Page object>
    • self.page.page_name = u'DavidCramer/TestPage'
  2. /usr/local/lib/python2.4/site-packages/MoinMoin/action/__init__.py in do_show (pagename=u'DavidCramer/TestPage', request=<MoinMoin.request.request_cgi.Request object>, content_only=0, count_hit=1, cacheable=1, print_mode=0)

    1. 251 count_hit=count_hit,
    2. 252 print_mode=print_mode,
    3. 253 content_only=content_only,
    4. 254 )
    5. 255
    • content_only = 0
  3. /usr/local/lib/python2.4/site-packages/MoinMoin/Page.py in send_page (self=<MoinMoin.Page.Page object>, **keywords={'content_only': 0, 'count_hit': 1, 'print_mode': 0})

    1. 1195 format_args=pi['formatargs'],
    2. 1196 do_cache=do_cache,
    3. 1197 start_line=pi['lines'])
    4. 1198
    5. 1199 # check for pending footnotes
    • start_line undefined
    • pi = {'acl': <MoinMoin.security.AccessControlList instance>, 'format': 'wiki', 'formatargs': '', 'language': 'en', 'lines': 0}
  4. /usr/local/lib/python2.4/site-packages/MoinMoin/Page.py in send_page_content (self=<MoinMoin.Page.Page object>, request=<MoinMoin.request.request_cgi.Request object>, body=u'{{{#!wiki important\n\'\'\'The title of the admoniti...\'\n\nSome text\n}}}\n\n<<Include(/FooBar,"Foo bar")>>\n', format='wiki', format_args='', do_cache=1, **kw={'start_line': 0})

    1. 1279
    2. 1280 if not (do_cache and self.canUseCache(Parser)):
    3. 1281 self.format(parser)
    4. 1282 else:
    5. 1283 try:
    • self = <MoinMoin.Page.Page object>
    • self.format = <bound method Page.format of <MoinMoin.Page.Page object>>
    • parser = <MoinMoin.parser.text_moin_wiki.Parser instance>
  5. /usr/local/lib/python2.4/site-packages/MoinMoin/Page.py in format (self=<MoinMoin.Page.Page object>, parser=<MoinMoin.parser.text_moin_wiki.Parser instance>)

    1. 1300 def format(self, parser):
    2. 1301 """ Format and write page content without caching """
    3. 1302 parser.format(self.formatter)
    4. 1303
    5. 1304 def execute(self, request, parser, code):
    • parser = <MoinMoin.parser.text_moin_wiki.Parser instance>
    • parser.format = <bound method Parser.format of <MoinMoin.parser.text_moin_wiki.Parser instance>>
    • self = <MoinMoin.Page.Page object>
    • self.formatter = <MoinMoin.formatter.text_docbook.Formatter instance>
  6. /usr/local/lib/python2.4/site-packages/MoinMoin/parser/text_moin_wiki.py in format (self=<MoinMoin.parser.text_moin_wiki.Parser instance>, formatter=<MoinMoin.formatter.text_docbook.Formatter instance>, inhibit_p=False)

    1. 1543
    2. 1544 # Scan line, format and write
    3. 1545 formatted_line = self.scan(line, inhibit_p=inhibit_p)
    4. 1546 self.request.write(formatted_line)
    5. 1547
    • formatted_line = u''
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance>
    • self.scan = <bound method Parser.scan of <MoinMoin.parser.text_moin_wiki.Parser instance>>
    • line = u'<<Include(/FooBar,"Foo bar")>> '
    • inhibit_p = False
  7. /usr/local/lib/python2.4/site-packages/MoinMoin/parser/text_moin_wiki.py in scan (self=<MoinMoin.parser.text_moin_wiki.Parser instance>, line=u'<<Include(/FooBar,"Foo bar")>> ', inhibit_p=False)

    1. 1357 self.in_table or self.in_list):
    2. 1358 result.append(self.formatter.paragraph(1, css_class="line867"))
    3. 1359 result.append(self.replace(match, inhibit_p))
    4. 1360 end = match.end()
    5. 1361 lastpos = end
    • result = ['']
    • result.append = <built-in method append of list object>
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance>
    • self.replace = <bound method Parser.replace of <MoinMoin.parser.text_moin_wiki.Parser instance>>
    • match = <_sre.SRE_Match object>
    • inhibit_p = False
  8. /usr/local/lib/python2.4/site-packages/MoinMoin/parser/text_moin_wiki.py in replace (self=<MoinMoin.parser.text_moin_wiki.Parser instance>, match=<_sre.SRE_Match object>, inhibit_p=False)

    1. 1401 # Get replace method and replace hit
    2. 1402 replace_func = getattr(self, '_%s_repl' % type)
    3. 1403 result.append(replace_func(hit, match.groupdict()))
    4. 1404 return ''.join(result)
    5. 1405 else:
    • result = []
    • result.append = <built-in method append of list object>
    • replace_func = <bound method Parser._macro_repl of <MoinMoin.parser.text_moin_wiki.Parser instance>>
    • hit = u'/FooBar,"Foo bar"'
    • match = <_sre.SRE_Match object>
    • match.groupdict = <built-in method groupdict of _sre.SRE_Match object>
  9. /usr/local/lib/python2.4/site-packages/MoinMoin/parser/text_moin_wiki.py in _macro_repl (self=<MoinMoin.parser.text_moin_wiki.Parser instance>, word=u'/FooBar,"Foo bar"', groups={u'big': None, u'big_off': None, u'big_on': None, u'comment': None, u'dl': None, u'email': None, u'emph': None, u'emph_ib_or_bi': None, u'emph_ibb': None, u'emph_ibi': None, ...})

    1. 1324 if self.macro is None:
    2. 1325 self.macro = macro.Macro(self)
    3. 1326 return self.formatter.macro(self.macro, macro_name, macro_args, markup=groups.get('macro'))
    4. 1327 _macro_name_repl = _macro_repl
    5. 1328 _macro_args_repl = _macro_repl
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance>
    • self.formatter = <MoinMoin.formatter.text_docbook.Formatter instance>
    • self.formatter.macro = <bound method Formatter.macro of <MoinMoin.formatter.text_docbook.Formatter instance>>
    • self.macro = <MoinMoin.macro.Macro instance>
    • macro_name = u'Include'
    • macro_args = u'/FooBar,"Foo bar"'
    • markup undefined
    • groups = {u'big': None, u'big_off': None, u'big_on': None, u'comment': None, u'dl': None, u'email': None, u'emph': None, u'emph_ib_or_bi': None, u'emph_ibb': None, u'emph_ibi': None, ...}
    • groups.get = <built-in method get of dict object>
  10. /usr/local/lib/python2.4/site-packages/MoinMoin/formatter/text_docbook.py in macro (self=<MoinMoin.formatter.text_docbook.Formatter instance>, macro_obj=<MoinMoin.macro.Macro instance>, name=u'Include', args=u'/FooBar,"Foo bar"', markup=u'<<Include(/FooBar,"Foo bar")>>')

    1. 613 if was_in_para:
    2. 614 self.paragraph(0)
    3. 615 text = FormatterBase.macro(self, macro_obj, name, args)
    4. 616 if text.strip():
    5. 617 self._copyExternalNodes(Sax.FromXml(text).documentElement.childNodes, exclude=excludes)
    • text undefined
    • global FormatterBase = <class MoinMoin.formatter.FormatterBase>
    • FormatterBase.macro = <unbound method FormatterBase.macro>
    • self = <MoinMoin.formatter.text_docbook.Formatter instance>
    • macro_obj = <MoinMoin.macro.Macro instance>
    • name = u'Include'
    • args = u'/FooBar,"Foo bar"'
  11. /usr/local/lib/python2.4/site-packages/MoinMoin/formatter/__init__.py in macro (self=<MoinMoin.formatter.text_docbook.Formatter instance>, macro_obj=<MoinMoin.macro.Macro instance>, name=u'Include', args=u'/FooBar,"Foo bar"', markup=None)

    1. 312 # call the macro
    2. 313 try:
    3. 314 return macro_obj.execute(name, args)
    4. 315 except ImportError, err:
    5. 316 errmsg = unicode(err)
    • macro_obj = <MoinMoin.macro.Macro instance>
    • macro_obj.execute = <bound method Macro.execute of <MoinMoin.macro.Macro instance>>
    • name = u'Include'
    • args = u'/FooBar,"Foo bar"'
  12. /usr/local/lib/python2.4/site-packages/MoinMoin/macro/__init__.py in execute (self=<MoinMoin.macro.Macro instance>, macro_name=u'Include', args=u'/FooBar,"Foo bar"')

    1. 126 else:
    2. 127 raise ImportError("Cannot load macro %s" % macro_name)
    3. 128 return execute(self, args)
    4. 129
    5. 130 def _m_lang(self, text):
    • execute = <function execute>
    • self = <MoinMoin.macro.Macro instance>
    • args = u'/FooBar,"Foo bar"'
  13. /usr/local/share/moin/pubswiki/data/plugin/macro/Include.py in execute (macro=<MoinMoin.macro.Macro instance>, text=u'/FooBar,"Foo bar"', args_re=<_sre.SRE_Pattern object>, title_re=<_sre.SRE_Pattern object>)

    1. 189 else:
    2. 190 url = inc_page.url(request)
    3. 191 result.extend([
    4. 192 macro.formatter.heading(1, level, id=heading) +
    5. 193 "<span style='font-size: .5em'>&nbsp;" +
    • result = []
    • result.extend = <built-in method extend of list object>
    • macro = <MoinMoin.macro.Macro instance>
    • macro.formatter = <MoinMoin.formatter.text_docbook.Formatter instance>
    • macro.formatter.heading = <bound method Formatter.heading of <MoinMoin.formatter.text_docbook.Formatter instance>>
    • level = 1
    • builtin id = <built-in function id>
    • heading = u'Foo bar'
    • inc_page = <MoinMoin.Page.Page object>
    • inc_page.link_to = <bound method Page.link_to of <MoinMoin.Page.Page object>>
    • request = <MoinMoin.request.request_cgi.Request object>
    • _ = <function <lambda>>
    • css_class undefined
    • querystr undefined
    • request._Include_backto = u'DavidCramer/TestPage'
    • macro.formatter.url = <bound method Formatter.url of <MoinMoin.formatter.text_docbook.Formatter instance>>
    • url = '/wiki/DavidCramer/TestPage/FooBar'
    • css undefined
    • macro.formatter.text = <bound method Formatter.text of <MoinMoin.formatter.text_docbook.Formatter instance>>
  14. /usr/local/lib/python2.4/site-packages/MoinMoin/Page.py in link_to (self=<MoinMoin.Page.Page object>, request=<MoinMoin.request.request_cgi.Request object>, text='[edit]', querystr={'action': 'edit', 'backto': u'DavidCramer/TestPage'}, anchor=None, **kw={'css_class': 'include-edit-link'})

    1. 799 del kw['attachment_indicator'] # avoid having this as <a> tag attribute
    2. 800
    3. 801 link = self.link_to_raw(request, text, querystr, anchor, **kw)
    4. 802
    5. 803 # Create a link to attachments if any exist
    • link undefined
    • self = <MoinMoin.Page.Page object>
    • self.link_to_raw = <bound method Page.link_to_raw of <MoinMoin.Page.Page object>>
    • request = <MoinMoin.request.request_cgi.Request object>
    • text = '[edit]'
    • querystr = {'action': 'edit', 'backto': u'DavidCramer/TestPage'}
    • anchor = None
    • kw = {'css_class': 'include-edit-link'}
  15. /usr/local/lib/python2.4/site-packages/MoinMoin/Page.py in link_to_raw (self=<MoinMoin.Page.Page object>, request=<MoinMoin.request.request_cgi.Request object>, text='[edit]', querystr={'action': 'edit', 'backto': u'DavidCramer/TestPage'}, anchor=None, **kw={'css_class': 'include-edit-link'})

    1. 767 # escaping is done by link_tag -> formatter.url -> ._open()
    2. 768 link = wikiutil.link_tag(request, url, text,
    3. 769 formatter=getattr(self, 'formatter', None), **kw)
    4. 770 return link
    5. 771
    • formatter undefined
    • builtin getattr = <built-in function getattr>
    • self = <MoinMoin.Page.Page object>
    • builtin None = None
    • kw = {'css_class': 'include-edit-link'}
  16. /usr/local/lib/python2.4/site-packages/MoinMoin/wikiutil.py in link_tag (request=<MoinMoin.request.request_cgi.Request object>, params='DavidCramer/TestPage/FooBar?action=edit&backto=DavidCramer/TestPage', text='[edit]', formatter=<MoinMoin.formatter.text_docbook.Formatter instance>, on=None, **kw={})

    1. 2371 tag = formatter.url(on, url, css_class, **kw)
    2. 2372 else:
    3. 2373 tag = (formatter.url(1, url, css_class, **kw) +
    4. 2374 formatter.rawHTML(text) +
    5. 2375 formatter.url(0))
    • tag undefined
    • formatter = <MoinMoin.formatter.text_docbook.Formatter instance>
    • formatter.url = <bound method Formatter.url of <MoinMoin.formatter.text_docbook.Formatter instance>>
    • url = '/wiki/DavidCramer/TestPage/FooBar?action=edit&backto=DavidCramer/TestPage'
    • css_class = 'include-edit-link'
    • kw = {}
    • formatter.rawHTML = <bound method Formatter.rawHTML of <MoinMoin.formatter.text_docbook.Formatter instance>>
    • text = '[edit]'
  17. /usr/local/lib/python2.4/site-packages/MoinMoin/formatter/text_docbook.py in url (self=<MoinMoin.formatter.text_docbook.Formatter instance>, on=1, url='http://pubs/wiki/wiki/DavidCramer/TestPage/FooBar?action=edit&backto=DavidCramer/TestPage', css='include-edit-link', **kw={})

    1. 374 return self._handleNode("link", on, attributes=(('linkend', kw["anchor"]), ))
    2. 375 else:
    3. 376 return self._handleNode("ulink", on, attributes=(('url', url), ))
    4. 377
    5. 378 def anchordef(self, name):
    • self = <MoinMoin.formatter.text_docbook.Formatter instance>
    • self._handleNode = <bound method Formatter._handleNode of <MoinMoin.formatter.text_docbook.Formatter instance>>
    • on = 1
    • attributes undefined
    • url = 'http://pubs/wiki/wiki/DavidCramer/TestPage/FooBar?action=edit&backto=DavidCramer/TestPage'
  18. /usr/local/lib/python2.4/site-packages/MoinMoin/formatter/text_docbook.py in _handleNode (self=<MoinMoin.formatter.text_docbook.Formatter instance>, name='ulink', on=1, attributes=(('url', 'http://pubs/wiki/wiki/DavidCramer/TestPage/FooBar?action=edit&backto=DavidCramer/TestPage'),))

    1. 652 def _handleNode(self, name, on, attributes=()):
    2. 653 if on:
    3. 654 node = self.doc.createElement(name)
    4. 655 self.cur.appendChild(node)
    5. 656 if len(attributes) > 0:
    • node undefined
    • self = <MoinMoin.formatter.text_docbook.Formatter instance>
    • self.doc undefined
    • name = 'ulink'

AttributeError

Formatter instance has no attribute 'doc'

  • args = ("Formatter instance has no attribute 'doc'",)

System Details

  • Date: Thu, 25 Dec 2008 04:08:30 +0000
  • Platform: SunOS newthing 5.10 Generic_137138-09 i86pc
  • Python: Python 2.4.4 (/usr/bin/python)
  • MoinMoin: Release 1.8.1 (release)

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2008-12-26 18:14:47, 27.1 KB) [[attachment:TestPage.html]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.