Page MenuHomePhabricator

Pywikibot error when using category.py
Closed, ResolvedPublic

Description

From my amateur point of view it is not solely category.py problem, but it occured when trying to move categories on cs.wiki (Category:Bohové zvířat -> Category:Zvířecí božstva), so I am filing it this way.

I am using pywikibot on windows, version.py gives

Pywikibot: [https] r-pywikibot-core.git (7a04e89, g5417, 2015/04/27, 23:23:37, n
/a)
Release version: 2.0b3
httplib2 version: 0.9
  cacerts: core\externals\httplib2\python2\httplib2
\cacerts.txt
    certificate test: not ok
Python: 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)]
  unicode test: ok

Traceback:

ERROR: Traceback (most recent call last):
  File "core\pywikibot\data\api.py", line 1555, in
submit
    body=body, headers=headers)
  File "core\pywikibot\tools\__init__.py", line 949
, in wrapper
    return obj(*__args, **__kw)
  File "core\pywikibot\comms\http.py", line 269, in
 request
    r = fetch(baseuri, method, body, headers, **kwargs)
  File "core\pywikibot\comms\http.py", line 371, in
 fetch
    error_handling_callback(request)
  File "core\pywikibot\comms\http.py", line 287, in
 error_handling_callback
    raise request.data
SSLError: [Errno 185090050] _ssl.c:344: error:0B084002:x509 certificate routines
:X509_load_cert_crl_file:system lib

Details

Related Changes in Gerrit:

Event Timeline

Wesalius raised the priority of this task from to Needs Triage.
Wesalius updated the task description. (Show Details)
Wesalius added a project: Pywikibot.
Wesalius subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptApr 28 2015, 6:26 AM

I remember something about this. Try to see if this is useful T67189

httplib2 version: 0.9
    cacerts: core\externals\httplib2\python2\httplib2\cacerts.txt
      certificate test: not ok

certificate test: not ok is the important part. But this is strange, as the externals httplib2 version should include the Wikimedia certificate cacerts, which is identified by MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs

Could you look for that cacerts.txt file, and check it contains MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs

If it doesnt contain that magic text, replace it with the following file:

https://git.wikimedia.org/raw/pywikibot%2Fexternals%2Fhttplib2.git/ada7d1fa9694f81e8ad64063e4f35a680c501ce0/python2%2Fhttplib2%2Fcacerts.txt

I did not even have a cacerts.txt file O_o I downloaded it and placed in the appropriate location.

Now I get:

ERROR: Fatal error:
Traceback (most recent call last):
  File ".\scripts\category.py", line 1258, in main
    bot.run()
  File ".\scripts\category.py", line 539, in run
    self._strip_cfd_templates()
  File ".\scripts\category.py", line 673, in _strip_cfd_templates
    'category-strip-cfd-templates')
  File "\core\pywikibot\i18n.py", line 508, in twtra
nslate
    "for TranslateWiki key %r" % twtitle)
TranslationError: No English translation has been defined for TranslateWiki key
u'category-strip-cfd-templates'

try : core> git submodules update

git submodule update

resolved the problem. Thanks.

Wesalius set Security to None.

Change 208004 had a related patch set uploaded (by John Vandenberg):
Report when cacerts is missing

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

Change 208004 merged by jenkins-bot:
Report when cacerts is missing

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