Page MenuHomePhabricator

Interwiki.py - ERROR: local variable 'mcomment' referenced before assignment (UnboundLocalError)
Closed, ResolvedPublicBUG REPORT

Description

python pwb.py interwiki -family:foo -lang:es -askhints PageName
Retrieving 1 pages from foo:es.
[[es:PageName]]: [[es:PageName]] gives new interwiki [[en:PageNameEN]]
Give a hint (? to see pagetext): en:PageNameEN
Give a hint (? to see pagetext): fr:PageNameFR
Give a hint (? to see pagetext): 
Retrieving 1 pages from foo:en.
[[es:PageName]]: [[en:PageNameEN]] gives new interwiki [[fr:PageNameFR]]
Retrieving 1 pages from foo:fr.
[[es:PageName]]: [[fr:PageNameFR]] gives new interwiki [[en:PageNameEN]]
======Post-processing [[es:PageName]]======
Updating links on page [[en:PageNameEN]].
Changes to be made: Bot: Adding [[es:PageName]]
@@ -317,0 +318 @@
+ [[es:PageName]]

NOTE: Updating live wiki...
ERROR: local variable 'mcomment' referenced before assignment (UnboundLocalError)
Dump es (foo) appended.

Using latest code from origin/master

Event Timeline

Xqt triaged this task as Medium priority.

Change 806456 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] assign compareLanguages results to be used later

https://gerrit.wikimedia.org/r/806456

This seems to have corrected the issue for me.

Change 806456 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] assign compareLanguages results to be used later

https://gerrit.wikimedia.org/r/806456