Attachment 'ValueErrorWidthTraceback.html'

Download

ValueError

Illegal HTML attribute "width" passed to formatter

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. /org/moin_tw/moin-1.5/MoinMoin/request.py in run (self=<MoinMoin.request.RequestTwisted object>)

    1. 1137 from MoinMoin.wikiaction import getHandler
    2. 1138 handler = getHandler(self, action)
    3. 1139 handler(self.page.page_name, self)
    4. 1140
    5. 1141 # 5. Or redirect to another page
    • handler = <function do_edit>
    • self = <MoinMoin.request.RequestTwisted object>
    • self.page = <MoinMoin.Page.Page instance>
    • self.page.page_name = u'WikiSandBox'
  2. /org/moin_tw/moin-1.5/MoinMoin/wikiaction.py in do_edit (pagename=u'WikiSandBox', request=<MoinMoin.request.RequestTwisted object>)

    1. 624 # Preview with mode switch
    2. 625 elif request.form.has_key('button_switch'):
    3. 626 pg.sendEditor(preview=savetext, comment=comment, staytop=1)
    4. 627
    5. 628 # Save new text
    • pg = <MoinMoin.PageGraphicalEditor.PageGraphicalEditor instance>
    • pg.sendEditor = <bound method PageGraphicalEditor.sendEditor of ...ageGraphicalEditor.PageGraphicalEditor instance>>
    • preview undefined
    • savetext = u'## Please edit system and help pages ONLY in the... ====\n\n||<style="width: 40%;"> hello || world ||\n'
    • comment = u''
    • staytop undefined
  3. /org/moin_tw/moin-1.5/MoinMoin/PageGraphicalEditor.py in sendEditor (self=<MoinMoin.PageGraphicalEditor.PageGraphicalEditor instance>, **kw={'comment': u'', 'preview': u'## Please edit system and help pages ONLY in the... ====\n\n||<style="width: 40%;"> hello || world ||\n', 'staytop': 1})

    1. 285 self.formatter = Formatter(request)
    2. 286 self.formatter.page = self
    3. 287 output = request.redirectedOutput(self.send_page_content, request, Parser, raw_body, do_cache=False)
    4. 288 output = repr(output)
    5. 289 if output[0] == 'u':
    • output undefined
    • request = <MoinMoin.request.RequestTwisted object>
    • request.redirectedOutput = <bound method RequestTwisted.redirectedOutput of <MoinMoin.request.RequestTwisted object>>
    • self = <MoinMoin.PageGraphicalEditor.PageGraphicalEditor instance>
    • self.send_page_content = <bound method PageGraphicalEditor.send_page_cont...ageGraphicalEditor.PageGraphicalEditor instance>>
    • global Parser = <class MoinMoin.parser.wiki.Parser>
    • raw_body = u'## Please edit system and help pages ONLY in the... ====\n\n||<style="width: 40%;"> hello || world ||\n'
    • do_cache undefined
    • builtin False = False
  4. /org/moin_tw/moin-1.5/MoinMoin/request.py in redirectedOutput (self=<MoinMoin.request.RequestTwisted object>, function=<bound method PageGraphicalEditor.send_page_cont...ageGraphicalEditor.PageGraphicalEditor instance>>, *args=(<MoinMoin.request.RequestTwisted object>, <class MoinMoin.parser.wiki.Parser>, u'## Please edit system and help pages ONLY in the... ====\n\n||<style="width: 40%;"> hello || world ||\n'), **kw={'do_cache': False})

    1. 716 self.redirect(buffer)
    2. 717 try:
    3. 718 function(*args, **kw)
    4. 719 finally:
    5. 720 self.redirect()
    • function = <bound method PageGraphicalEditor.send_page_cont...ageGraphicalEditor.PageGraphicalEditor instance>>
    • args = (<MoinMoin.request.RequestTwisted object>, <class MoinMoin.parser.wiki.Parser>, u'## Please edit system and help pages ONLY in the... ====\n\n||<style="width: 40%;"> hello || world ||\n')
    • kw = {'do_cache': False}
  5. /org/moin_tw/moin-1.5/MoinMoin/Page.py in send_page_content (self=<MoinMoin.PageGraphicalEditor.PageGraphicalEditor instance>, request=<MoinMoin.request.RequestTwisted object>, Parser=<class MoinMoin.parser.wiki.Parser>, body=u'## Please edit system and help pages ONLY in the... ====\n\n||<style="width: 40%;"> hello || world ||\n', format_args='', do_cache=False, **kw={})

    1. 1312
    2. 1313 if not (do_cache and self.canUseCache(Parser)):
    3. 1314 self.format(parser)
    4. 1315 else:
    5. 1316 try:
    • self = <MoinMoin.PageGraphicalEditor.PageGraphicalEditor instance>
    • self.format = <bound method PageGraphicalEditor.format of <Moi...ageGraphicalEditor.PageGraphicalEditor instance>>
    • parser = <MoinMoin.parser.wiki.Parser instance>
  6. /org/moin_tw/moin-1.5/MoinMoin/Page.py in format (self=<MoinMoin.PageGraphicalEditor.PageGraphicalEditor instance>, parser=<MoinMoin.parser.wiki.Parser instance>)

    1. 1329 def format(self, parser):
    2. 1330 """ Format and write page content without caching """
    3. 1331 parser.format(self.formatter)
    4. 1332
    5. 1333 def execute(self, request, parser, code):
    • parser = <MoinMoin.parser.wiki.Parser instance>
    • parser.format = <bound method Parser.format of <MoinMoin.parser.wiki.Parser instance>>
    • self = <MoinMoin.PageGraphicalEditor.PageGraphicalEditor instance>
    • self.formatter = <MoinMoin.formatter.text_gedit.Formatter instance>
  7. /org/moin_tw/moin-1.5/MoinMoin/parser/wiki.py in format (self=<MoinMoin.parser.wiki.Parser instance>, formatter=<MoinMoin.formatter.text_gedit.Formatter instance>)

    1. 1104
    2. 1105 # Scan line, format and write
    3. 1106 formatted_line = self.scan(scan_re, line)
    4. 1107 self.request.write(formatted_line)
    5. 1108
    • formatted_line = u'<h5>Heading 5</h5>'
    • self = <MoinMoin.parser.wiki.Parser instance>
    • self.scan = <bound method Parser.scan of <MoinMoin.parser.wiki.Parser instance>>
    • scan_re = <_sre.SRE_Pattern object>
    • line = u'||<style="width: 40%;"> hello || world || '
  8. /org/moin_tw/moin-1.5/MoinMoin/parser/wiki.py in scan (self=<MoinMoin.parser.wiki.Parser instance>, scan_re=<_sre.SRE_Pattern object>, line=u'||<style="width: 40%;"> hello || world || ')

    1. 890
    2. 891 # Replace match with markup
    3. 892 result.append(self.replace(match))
    4. 893 lastpos = match.end()
    5. 894
    • result = []
    • result.append = <built-in method append of list object>
    • self = <MoinMoin.parser.wiki.Parser instance>
    • self.replace = <bound method Parser.replace of <MoinMoin.parser.wiki.Parser instance>>
    • match = <_sre.SRE_Match object>
  9. /org/moin_tw/moin-1.5/MoinMoin/parser/wiki.py in replace (self=<MoinMoin.parser.wiki.Parser instance>, match=<_sre.SRE_Match object>)

    1. 919 # Get replace method and replece hit
    2. 920 replace = getattr(self, '_' + type + '_repl')
    3. 921 result.append(replace(hit))
    4. 922 return ''.join(result)
    5. 923 else:
    • result = []
    • result.append = <built-in method append of list object>
    • replace = <bound method Parser._table_repl of <MoinMoin.parser.wiki.Parser instance>>
    • hit = u'||<style="width: 40%;">'
  10. /org/moin_tw/moin-1.5/MoinMoin/parser/wiki.py in _table_repl (self=<MoinMoin.parser.wiki.Parser instance>, word=u'||<style="width: 40%;">')

    1. 755
    2. 756 # return the complete cell markup
    3. 757 result.append(self.formatter.table_cell(1, attrs) + attrerr)
    4. 758 return ''.join(result)
    5. 759 else:
    • result = ['<tr>']
    • result.append = <built-in method append of list object>
    • self = <MoinMoin.parser.wiki.Parser instance>
    • self.formatter = <MoinMoin.formatter.text_gedit.Formatter instance>
    • self.formatter.table_cell = <bound method Formatter.table_cell of <MoinMoin.formatter.text_gedit.Formatter instance>>
    • attrs = {u'style': u'"width: 40%;"'}
    • attrerr = ''
  11. /org/moin_tw/moin-1.5/MoinMoin/formatter/text_html.py in table_cell (self=<MoinMoin.formatter.text_gedit.Formatter instance>, on=1, attrs={u'style': u'', 'width': u'40%'}, **kw={})

    1. 1323 attrs = self._checkTableAttr(attrs, '')
    2. 1324 return ' ' + self._open(tag, attr=attrs,
    3. 1325 allowed_attrs=self._allowed_table_attrs[''],
    4. 1326 **kw)
    5. 1327 return self._close(tag) + '\n'
    • allowed_attrs undefined
    • self = <MoinMoin.formatter.text_gedit.Formatter instance>
    • self._allowed_table_attrs = {'': ['colspan', 'rowspan', 'class', 'id', 'style'], 'row': ['class', 'id', 'style'], 'table': ['class', 'id', 'style']}
  12. /org/moin_tw/moin-1.5/MoinMoin/formatter/text_html.py in _open (self=<MoinMoin.formatter.text_gedit.Formatter instance>, tag='td', newline=False, attr={u'style': u'', 'width': u'40%'}, allowed_attrs=['colspan', 'rowspan', 'class', 'id', 'style'], **kw={})

    1. 342
    2. 343 # Format
    3. 344 attributes = self._formatAttributes(attributes, allowed_attrs=allowed_attrs, **kw)
    4. 345 result.append('<%s%s%s>' % (tag, attributes, is_self_closing))
    5. 346 if newline:
    • attributes = {u'style': u'', 'width': u'40%'}
    • self = <MoinMoin.formatter.text_gedit.Formatter instance>
    • self._formatAttributes = <bound method Formatter._formatAttributes of <MoinMoin.formatter.text_gedit.Formatter instance>>
    • allowed_attrs = ['colspan', 'rowspan', 'class', 'id', 'style']
    • kw = {}
  13. /org/moin_tw/moin-1.5/MoinMoin/formatter/text_html.py in _formatAttributes (self=<MoinMoin.formatter.text_gedit.Formatter instance>, attr={u'style': u'', 'width': u'40%'}, allowed_attrs=['colspan', 'rowspan', 'class', 'id', 'style'], **kw={})

    1. 288 # Unknown or unallowed attribute.
    2. 289 err = 'Illegal HTML attribute "%s" passed to formatter' % name
    3. 290 raise ValueError(err)
    4. 291
    5. 292 # Finally, format them all as a single string.
    • builtin ValueError = <class exceptions.ValueError>
    • err = 'Illegal HTML attribute "width" passed to formatter'

ValueError

Illegal HTML attribute "width" passed to formatter

  • args = ('Illegal HTML attribute "width" passed to formatter',)

System Details

  • Date: Fri, 31 Mar 2006 21:57:14 +0000
  • Platform: Linux thinkmo 2.6.14-thinkmo-1 #1 SMP Wed Nov 9 17:33:56 CET 2005 x86_64
  • Python: Python 2.4.2 (/usr/local/bin/python2.4)
  • MoinMoin: Release 1.5.3-rc1 (patch-518)

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] (2007-02-02 04:06:46, 3.7 KB) [[attachment:FCKeditor-2.2-fixes.diff]]
  • [get | view] (2005-11-14 10:16:06, 10.2 KB) [[attachment:HelpOnLanguages.htm]]
  • [get | view] (2006-03-31 21:59:53, 55.2 KB) [[attachment:ValueErrorWidthTraceback.html]]
 All files | Selected Files: delete move to page copy to page

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