Page MenuHomePhabricator

TypeError running a script (via pwb.py)
Closed, ResolvedPublic

Description

running listpages.py always fail into TypeError while closing the script:

c:\Pywikipedia\core>pwb.py listpages -random:5 -lang:en

1: Category:2001 World Weightlifting Championships
2: Ministry for the Propagation of Virtue and the Prevention of Vice (Afghani

stan)

3: User talk:Oshirochan
4: Talk:Bardney monastery
5: User talk:62.45.39.95

Exception TypeError: TypeError("'NoneType' object is not callable",) in <bound m
ethod ConnectionPool.del of {'https:en.wikipedia.org': [<httplib2.python2.ht
tplib2.HTTPSConnectionWithTimeout instance at 0x000000000394E588>]}> ignored


Version: core-(2.0)
Severity: normal

Details

Reference
bz56879

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:27 AM
bzimport set Reference to bz56879.

Oh, this bug depends all scripts (maybe running through pwb.py)

I localized that at tests/pwb_tests.phy as:

c:\Pywikipedia\ssh\pywikibot\core>pwb.py tests/pwb_tests

WARNING: Configuration variable 'use_diskcache' is defined but unknown. Misspelled? WARNING: Configuration variable 'notify_unflagged_bot' is defined but unknown. Misspelled? WARNING: Running on Windows and transliteration_target is not set. Please see http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows testScriptEnvironment (__main__.TestPwb) Make sure the environment is not contaminated, and is the same as ... FAIL

FAIL: testScriptEnvironment (__main__.TestPwb)

Make sure the environment is not contaminated, and is the same as

Traceback (most recent call last):

File "tests/pwb_tests.py", line 43, in testScriptEnvironment
  self.assertEqual(direct, vpwb)

AssertionError: "'builtins': <module 'builtin' (built-in)>\r\n'name'
: 'main'\r\n'file': 'tests\\\\pwb\\\\print_locals.py'\r\n'doc': 'doc
string'\r\n'package': None\r\n" != "WARNING: Configuration variable 'use_dis
kcache' is defined but unknown.\r\nMisspelled?\r\nWARNING: Configuration variabl
e 'notify_unflagged_bot' is defined but unknown.\r\nMisspelled?\r\nWARNING: Runn
ing on Windows and transliteration_target is not set.\r\nPlease see http://www.m
ediawiki.org/wiki/Manual:Pywikipediabot/Windows\r\n'builtins': <module 'bu
iltin
' (built-in)>\r\n'name': 'main'\r\n'file': 'tests\\\\pwb\\\\p
rint_locals.py'\r\n'doc': 'docstring'\r\n'package': None\r\n"


Ran 1 test in 0.570s

FAILED (failures=1)
Exception TypeError: TypeError("'NoneType' object is not callable",) in <bound m
ethod ConnectionPool.del of {}> ignored

Change 100157 had a related patch set uploaded by Xqt:
(bug 56879) ignore TypeError while deleting

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

Change 100157 merged by jenkins-bot:
(bug 56879) ignore TypeError while deleting

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