Page MenuHomePhabricator

Tool Labs Pywikibot does not work with new shared Pywikibot config files
Closed, ResolvedPublic

Description

I configured my bot on the Tool Labs to use the shared Pywikibot code that was available in the directory /shared/pywikipedia/core
Since about 8 hours I am receiving the following error messages:

Traceback (most recent call last):

File "/shared/pywikipedia/core/pwb.py", line 187, in <module>
  import pywikibot  # noqa
File "/data/project/pywikibot/public_html/core/pywikibot/__init__.py", line 37, in <module>
  from pywikibot import config2 as config
File "/data/project/pywikibot/public_html/core/pywikibot/config2.py", line 1090, in <module>
  userinterface_lang = getdefaultlocale()[0].split('_')[0]

AttributeError: 'NoneType' object has no attribute 'split'

See logs:

https://tools.wmflabs.org/ato/log/szubcsonk.txt
https://tools.wmflabs.org/ato/log/frissdump.txt
https://tools.wmflabs.org/ato/log/archive.txt
https://tools.wmflabs.org/ato/log/napkepe.txt
https://tools.wmflabs.org/ato/log/figyelmet.txt
https://tools.wmflabs.org/ato/log/sign-of-life.txt

Bug caused by 58284529.

Details

Related Gerrit Patches:

Event Timeline

Ato_01 created this task.Mar 9 2016, 9:21 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptMar 9 2016, 9:21 PM
Ato_01 triaged this task as Normal priority.Mar 9 2016, 9:35 PM
Ato_01 updated the task description. (Show Details)Mar 10 2016, 5:58 AM
Ato_01 updated the task description. (Show Details)Mar 10 2016, 6:37 AM
Ato_01 updated the task description. (Show Details)Mar 10 2016, 8:06 AM
Rxy added a subscriber: Rxy.Mar 10 2016, 12:03 PM
Incola added a subscriber: Incola.Mar 10 2016, 10:06 PM

Also my bot that use the shared Pywikibot code is affected by the issue: see http://tools.wmflabs.org/incolabot/bar.php

zhuyifei1999 raised the priority of this task from Normal to Unbreak Now!.

Happens on grid engine (not on bastion) regardless of of whether the setup is with /shared/pywikipedia/core or an own setup.

locale.getdefaultlocale docs: language code and encoding may be None if their values cannot be determined.

zhuyifei1999 lowered the priority of this task from Unbreak Now! to High.Mar 11 2016, 9:17 AM

Change 276713 had a related patch set uploaded (by Zhuyifei1999):
config: userinterface_lang fallback to 'C'

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

Change 276713 merged by jenkins-bot:
config: userinterface_lang fallback to 'en'

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

jayvdb closed this task as Resolved.Mar 12 2016, 2:04 PM
jayvdb added a subscriber: jayvdb.

Thanks @zhuyifei1999 for fixing this bug my change created.

jayvdb updated the task description. (Show Details)Mar 12 2016, 2:28 PM

Change 278300 had a related patch set uploaded (by John Vandenberg):
tests.utils.execute: accept locale 'C' or missing

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

Change 278300 merged by jenkins-bot:
tests.utils.execute: accept locale 'C' or missing

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