Page MenuHomePhabricator

welcome raises TypeError exception if site is not configured
Closed, ResolvedPublic

Description

$ python pwb.py scripts/welcome.py -family:wikidata -lang:wikidata
[NoAct] Betterknower has no contributions.
[NoAct] PAC2 has no contributions.
[Match] Arseny1992 has enough edits to be welcomed.
Traceback (most recent call last):

File "pwb.py", line 157, in <module>
  run_python_file(fn, argv, argvu)
File "pwb.py", line 67, in run_python_file
  exec(compile(source, filename, "exec"), main_mod.__dict__)
File "scripts/welcome.py", line 966, in <module>
  main()
File "scripts/welcome.py", line 955, in main
  bot.run()
File "scripts/welcome.py", line 750, in run
  % globalvar.defaultSign)

TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'
<type 'exceptions.TypeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

The NoneType is welcome_text = i18n.translate(self.site, netext)


Version: core-(2.0)
Severity: major

Details

Reference
bz69039

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:30 AM
bzimport set Reference to bz69039.
bzimport added a subscriber: Unknown Object (????).

self.site is configured.
The bug is that netext has no entry for wikidata.

I would change the description of the bug.
welcome.py should exit without error is site is not managed by the script.

I am not sure if wikidata is supposed to be managed (in this case entry needs to be added) or not.

anyone familiar with that site?

Change 157983 had a related patch set uploaded by Mpaa:
Bug 69039 - welcome raises exception if site is not configured

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

Change 157983 merged by jenkins-bot:
Bug 69039 - welcome raises exception if site is not configured

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