Page MenuHomePhabricator

TextEditor: UnboundLocalError when no editor found
Closed, ResolvedPublic

Description

valhallasw@maeglin:pywikibot-core$ env -i python pwb.py shell                                                                                                  master 0
Welcome to the Pywikibot interactive shell!
>>> import pywikibot.editor
>>> pywikibot.editor.TextEditor().edit('test')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/valhallasw/src/pywikibot-core/pywikibot/editor.py", line 113, in edit
    raise pywikibot.Error(
UnboundLocalError: local variable 'pywikibot' referenced before assignment

Event Timeline

valhallasw raised the priority of this task from to Needs Triage.
valhallasw updated the task description. (Show Details)
valhallasw added a project: Pywikibot.
valhallasw subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptFeb 13 2015, 7:52 PM
gerritbot subscribed.

Change 190561 had a related patch set uploaded (by John Vandenberg):
Move import of 'gui' to top of file

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

Patch-For-Review

Change 190561 merged by jenkins-bot:
Move import of 'gui' to top of file

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

jayvdb claimed this task.