--> -->

UnboundLocalError

local variable 'newtitle' referenced before assignment

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. /home/user/workspace/moin-1.8/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_standalone.Request object at 0x2521ed0>)

    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 execute at 0xa3c8c0>
    • self = <MoinMoin.request.request_standalone.Request object at 0x2521ed0>
    • self.page = <MoinMoin.Page.Page object at 0x2521b50>
    • self.page.page_name = u'ReimarBauer/UnderConstruction'
  2. /home/user/workspace/moin-1.8/wiki/data/plugin/action/CreatePdfDocument.py in execute (pagename=u'ReimarBauer/UnderConstruction', request=<MoinMoin.request.request_standalone.Request object at 0x2521ed0>)

    1. 1910 self.valid_options[key][u'%d.0' % max] = self._(u'%d.0' % max)
    2. 1911
    3. 1912
    4. 1913 def execute(pagename, request):
    5. 1914 CreatePdfDocument(pagename, request).render()
    • global CreatePdfDocument = <class wikiconfig.p_283262d6379ab844971ef1430fa3...CreatePdfDocument.CreatePdfDocument at 0x1040d70>
    • pagename = u'ReimarBauer/UnderConstruction'
    • request = <MoinMoin.request.request_standalone.Request object at 0x2521ed0>
    • ).render undefined
  3. /home/user/workspace/moin-1.8/wiki/data/plugin/action/CreatePdfDocument.py in render (self=<wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>)

    1. 1473 self.form[self.form_trigger] = '1'
    2. 1474 # Continue with super function
    3. 1475 ActionBase.render(self)
    4. 1476
    5. 1477
    • global ActionBase = <class MoinMoin.action.ActionBase at 0xd98470>
    • ActionBase.render = <unbound method ActionBase.render>
    • self = <wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>
  4. /home/user/workspace/moin-1.8/MoinMoin/action/__init__.py in render (self=<wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>)

    1. 202 elif self.form_trigger in form: # user hit the trigger button
    2. 203 if self.ticket_ok():
    3. 204 success, self.error = self.do_action()
    4. 205 else:
    5. 206 success = False
    • success undefined
    • self = <wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>
    • self.error = ''
    • self.do_action = <bound method CreatePdfDocument.do_action of <wi...ocument.CreatePdfDocument instance at 0x17f4fc8>>
  5. /home/user/workspace/moin-1.8/wiki/data/plugin/action/CreatePdfDocument.py in do_action (self=<wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>)

    1. 1492 if self.form.has_key(u'generate_from_form') or self.form.has_key(u'preview'):
    2. 1493 self.update_values()
    3. 1494 return self.do_action_generate()
    4. 1495
    5. 1496 # Display a message with instructions.
    • self = <wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>
    • self.do_action_generate = <bound method CreatePdfDocument.do_action_genera...ocument.CreatePdfDocument instance at 0x17f4fc8>>
  6. /home/user/workspace/moin-1.8/wiki/data/plugin/action/CreatePdfDocument.py in do_action_generate (self=<wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>)

    1. 1558 """Create PDF document."""
    2. 1559 # Generate the HTML page using MoinMoin wiki engine.
    3. 1560 html = self.get_html()
    4. 1561 if html:
    5. 1562 if self.form.has_key('preview'):
    • html undefined
    • self = <wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>
    • self.get_html = <bound method CreatePdfDocument.get_html of <wik...ocument.CreatePdfDocument instance at 0x17f4fc8>>
  7. /home/user/workspace/moin-1.8/wiki/data/plugin/action/CreatePdfDocument.py in get_html (self=<wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>)

    1. 1668
    2. 1669 # Rename title of the document.
    3. 1670 titletext_html = self.fixhtmlstr(wikiutil.escape(newtitle))
    4. 1671 html = re.compile(r'<title>[^<]+</title>').sub(u'<title>%s</title>' % titletext_html, html)
    5. 1672
    • titletext_html undefined
    • self = <wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>
    • self.fixhtmlstr = <bound method CreatePdfDocument.fixhtmlstr of <w...ocument.CreatePdfDocument instance at 0x17f4fc8>>
    • global wikiutil = <module 'MoinMoin.wikiutil' from '/home/user/workspace/moin-1.8/MoinMoin/wikiutil.pyc'>
    • wikiutil.escape = <function escape at 0xaa58c0>
    • newtitle undefined

UnboundLocalError

local variable 'newtitle' referenced before assignment

  • args = ("local variable 'newtitle' referenced before assignment",)
  • message = "local variable 'newtitle' referenced before assignment"

System Details