maiden_taiwan created this task.
maiden_taiwan added a project: Pywikibot-core.
Herald added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION

If a MediaWiki site is private, requiring a login in order to read articles, then generate_family_file.py dies when trying to create a family file for that site.

$ ./generate_family_file.py https://privatewiki.example.com/wiki/Main_Page test
Generating family file from https://privatewiki.example.com/wiki/Main_Page
Traceback (most recent call last):
  File "./generate_family_file.py", line 321, in <module>
    FamilyFileGenerator(*sys.argv[1:]).run()
  File "./generate_family_file.py", line 94, in run
    w = Wiki(self.base_url)
  File "./generate_family_file.py", line 262, in __init__
    self._parse_post_117(wp, fromurl)
  File "./generate_family_file.py", line 293, in _parse_post_117
    info = json.loads(data.read().decode(data.charset))['query']['general']
KeyError: u'query'

Version info:

Pywikibot: [https] r-pywikibot-core.git (fd4707e, g2, 2016/12/05, 19:10:45, n/a)
Release version: 2.0rc5
httplib2 version: 0.9.1
  cacerts: /home/smith/pywikibot/core_stable/externals/httplib2/python2/httplib2/cacerts.txt
    certificate test: ok
Python: 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609]
  unicode test: ok
PYWIKIBOT2_DIR: Not set
PYWIKIBOT2_DIR_PWB: .
PYWIKIBOT2_NO_USER_CONFIG: Not set

TASK DETAIL
https://phabricator.wikimedia.org/T153891

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: maiden_taiwan
Cc: Aklapper, maiden_taiwan, pywikibot-bugs-list, Magul, Tbscho, MayS, Mdupont, JJMC89, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to