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.
/home/user/workspace/moin-1.8/MoinMoin/request/__init__.py
in run
(self=<MoinMoin.request.request_standalone.Request object at 0x2521ed0>)
- 1309 self.page.send_page()
- 1310 else:
- 1311 handler(self.page.page_name, self)
- 1312
- 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'
/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>)
- 1910 self.valid_options[key][u'%d.0' % max] = self._(u'%d.0' % max)
- 1911
- 1912
- 1913 def execute(pagename, request):
- 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
/home/user/workspace/moin-1.8/wiki/data/plugin/action/CreatePdfDocument.py
in render
(self=<wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>)
- 1473 self.form[self.form_trigger] = '1'
- 1474 # Continue with super function
- 1475 ActionBase.render(self)
- 1476
- 1477
- global
ActionBase
= <class MoinMoin.action.ActionBase at 0xd98470>
- ActionBase.render
= <unbound method ActionBase.render>
- self
= <wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>
/home/user/workspace/moin-1.8/MoinMoin/action/__init__.py
in render
(self=<wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>)
- 202 elif self.form_trigger in form: # user hit the trigger button
- 203 if self.ticket_ok():
- 204 success, self.error = self.do_action()
- 205 else:
- 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>>
/home/user/workspace/moin-1.8/wiki/data/plugin/action/CreatePdfDocument.py
in do_action
(self=<wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>)
- 1492 if self.form.has_key(u'generate_from_form') or self.form.has_key(u'preview'):
- 1493 self.update_values()
- 1494 return self.do_action_generate()
- 1495
- 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>>
/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>)
- 1558 """Create PDF document."""
- 1559 # Generate the HTML page using MoinMoin wiki engine.
- 1560 html = self.get_html()
- 1561 if html:
- 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>>
/home/user/workspace/moin-1.8/wiki/data/plugin/action/CreatePdfDocument.py
in get_html
(self=<wikiconfig.p_283262d6379ab844971ef1430fa38349a5...Document.CreatePdfDocument instance at 0x17f4fc8>)
- 1668
- 1669 # Rename title of the document.
- 1670 titletext_html = self.fixhtmlstr(wikiutil.escape(newtitle))
- 1671 html =
re.compile(r'<title>[^<]+</title>').sub(u'<title>%s</title>'
% titletext_html, html)
- 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
- Date: Sun, 21 Dec 2008 10:20:31 +0000
- Platform: Linux linux 2.6.24-22-generic #1 SMP Mon Nov 24 19:35:06 UTC 2008 x86_64
- Python: Python 2.5.2 (/usr/bin/python)
- MoinMoin: Release 1.8.0 (release)