Page MenuHomePhabricator

replace.py fails to run because of incorrect number of arguments given to __init__()
Closed, ResolvedPublic

Description

Pywikibot currently installed on Tool Labs has a buggy replace.py that fails to run even in a minimalistic setup:

$ python /shared/pywikipedia/core/scripts/replace.py -page:SomePage -summary:someSummary fromString toString
Traceback (most recent call last):
  File "/shared/pywikipedia/core/scripts/replace.py", line 969, in <module>
    main()
  File "/shared/pywikipedia/core/scripts/replace.py", line 958, in main
    site)
  File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1102, in wrapper
    return obj(*__args, **__kw)
TypeError: __init__() takes at most 10 arguments (11 given)
<type 'exceptions.TypeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

Event Timeline

Blahma raised the priority of this task from to High.
Blahma updated the task description. (Show Details)
Blahma added a project: Pywikibot.
Blahma subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptJun 2 2015, 10:25 PM
XZise subscribed.

Yep 5d832536 has introduced that bug.

Change 215536 had a related patch set uploaded (by XZise):
[FIX] replace: Allow site to be given positionally

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

Change 215536 merged by jenkins-bot:
[FIX] replace: Allow site to be given positionally

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

Ricordisamoa removed a project: Patch-For-Review.
Ricordisamoa set Security to None.
Ricordisamoa edited subscribers, added: Ricordisamoa; removed: gerritbot.