https://bugzilla.wikimedia.org/show_bug.cgi?id=54963
Web browser: --- Bug ID: 54963 Summary: generate_family_file.py: WARNING: Api does not seem to be enabled Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: federicoleva@tiscali.it Classification: Unclassified Mobile Platform: ---
$ python generate_family_file.py http://translatewiki.net/w/api.php twn Generating family file from https://translatewiki.net/w/api.php *** WARNING: Api does not seem to be enabled on https://translatewiki.net/w/api.php Traceback (most recent call last): File "generate_family_file.py", line 339, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 73, in run w = Wiki(self.base_url) File "generate_family_file.py", line 284, in __init__ self._parse_pre_117(data) File "generate_family_file.py", line 296, in _parse_pre_117 self.server = self.REwgServer.search(data).groups()[0] AttributeError: 'NoneType' object has no attribute 'groups'
$ python --version Python 2.7.3 $ python version.py Pywikibot [https] r/pywikibot/compat (r10331, 445623d, 2013/10/01, 18:00:37, ok) Release version: 1.0b1 Python: 2.7.3 (default, Aug 9 2012, 17:23:58) [GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] config-settings: use_api = True use_api_login = True unicode test: ok
It's the same with Pywikipedia trunk/pywikipedia/ (r11781, 2013/07/20, 11:39:29, ok)
https://bugzilla.wikimedia.org/show_bug.cgi?id=54963
--- Comment #1 from Nemo federicoleva@tiscali.it --- Note that I gave http as input and it used https, despite no redirect being in place.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54963
Betacommand Phoenixoverride@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |Phoenixoverride@gmail.com Resolution|--- |INVALID
--- Comment #2 from Betacommand Phoenixoverride@gmail.com --- Use the link http://translatewiki.net/wiki/Main_Page the generate_family_file.py is designed to use the main url of the wiki to generate the family file not the api url.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54963
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Low Status|RESOLVED |REOPENED CC| |valhallasw@arctus.nl Resolution|INVALID |--- Severity|normal |enhancement
--- Comment #3 from Merlijn van Deen valhallasw@arctus.nl --- It would also be useful to understand direct api urls. Re-opening as feature request.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54963
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jayvdb@gmail.com Version|unspecified |core (2.0) See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=70795
--- Comment #4 from John Mark Vandenberg jayvdb@gmail.com --- In core, the logic in FamilyFileGenerator can be migrated into AutoFamily and APISite, which already understands /api.php URLs, and can access the API.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54963
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=72845
https://bugzilla.wikimedia.org/show_bug.cgi?id=54963
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |easy
pywikipedia-bugs@lists.wikimedia.org