--> -->

UnboundLocalError

local variable 'next_line' 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. /usr/lib/python2.3/site-packages/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.CGI.Request object>)

    1. 1144 from MoinMoin import action
    2. 1145 handler = action.getHandler(self, action_name)
    3. 1146 handler(self.page.page_name, self)
    4. 1147
    5. 1148 # every action that didn't use to raise MoinMoinNoFooter must call this now:
    • handler = <function execute>
    • self = <MoinMoin.request.CGI.Request object>
    • self.page = <MoinMoin.Page.Page instance>
    • self.page.page_name = u'SyncTest'
  2. /usr/lib/python2.3/site-packages/MoinMoin/action/SyncPages.py in execute (pagename=u'SyncTest', request=<MoinMoin.request.CGI.Request object>)

    1. 365
    2. 366
    3. 367 def execute(pagename, request):
    4. 368 ActionClass(pagename, request).render()
    5. 369
    • global ActionClass = <class 'MoinMoin.action.SyncPages.ActionClass'>
    • pagename = u'SyncTest'
    • request = <MoinMoin.request.CGI.Request object>
    • ).render undefined
  3. /usr/lib/python2.3/site-packages/MoinMoin/action/SyncPages.py in render (self=<MoinMoin.action.SyncPages.ActionClass object>)

    1. 138 raise ActionStatus(_("The ''remoteWiki'' is unknown."))
    2. 139
    3. 140 self.sync(params, local, remote)
    4. 141 except ActionStatus, e:
    5. 142 msg = u'<p class="error">%s</p>\n' % (e.args[0], )
    • self = <MoinMoin.action.SyncPages.ActionClass object>
    • self.sync = <bound method ActionClass.sync of <MoinMoin.action.SyncPages.ActionClass object>>
    • params = {'direction': 2, 'groupList': None, 'localPrefix': '', 'pageList': [u'ThisExample'], 'pageMatch': <_sre.SRE_Pattern object>, 'remotePrefix': '', 'remoteWiki': u'SyncTestWiki'}
    • local = <MoinLocalWiki>
    • remote = <MoinRemoteWiki wiki_url=u'http://sync.wikiwikiweb.de/' valid=True>
  4. /usr/lib/python2.3/site-packages/MoinMoin/action/SyncPages.py in sync (self=<MoinMoin.action.SyncPages.ActionClass object>, params={'direction': 2, 'groupList': None, 'localPrefix': '', 'pageList': [u'ThisExample'], 'pageMatch': <_sre.SRE_Pattern object>, 'remotePrefix': '', 'remoteWiki': u'SyncTestWiki'}, local=<MoinLocalWiki>, remote=<MoinRemoteWiki wiki_url=u'http://sync.wikiwikiweb.de/' valid=True>)

    1. 362
    2. 363 for sp in m_pages:
    3. 364 handle_page(sp)
    4. 365
    5. 366
    • handle_page = <function handle_page>
    • sp = "<Sync Page u'ThisExample[ThisExample|ThisExample]<None:1>'>"
  5. /usr/lib/python2.3/site-packages/MoinMoin/action/SyncPages.py in handle_page (sp="<Sync Page u'ThisExample[ThisExample|ThisExample]<None:1>'>")

    1. 336 # XXX upgrade to write lock
    2. 337 try:
    3. 338 current_page.saveText(merged_text, sp.local_rev, comment=comment) # YYY direct access
    4. 339 except PageEditor.Unchanged:
    5. 340 pass
    • current_page = <MoinMoin.PageEditor.PageEditor instance>
    • current_page.saveText = <bound method PageEditor.saveText of <MoinMoin.PageEditor.PageEditor instance>>
    • merged_text = u'ThisExample hier beschreiben...\n'
    • sp = "<Sync Page u'ThisExample[ThisExample|ThisExample]<None:1>'>"
    • sp.local_rev = None
    • comment = u"Local Merge - 'SyncTestWiki'"
  6. /usr/lib/python2.3/site-packages/MoinMoin/PageEditor.py in saveText (self=<MoinMoin.PageEditor.PageEditor instance>, newtext=u'ThisExample hier beschreiben...\n', rev=None, **kw={'comment': u"Local Merge - 'SyncTestWiki'"})

    1. 950 other = True
    2. 951 next_line = line
    3. 952 if next_line.is_from_current_user(self.request):
    4. 953 saved_page = Page(self.request, self.page_name,
    5. 954 rev=int(next_line.rev))
    • next_line undefined
    • self = <MoinMoin.PageEditor.PageEditor instance>
    • self.request = <MoinMoin.request.CGI.Request object>

UnboundLocalError

local variable 'next_line' referenced before assignment

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

System Details