Last modified: 2014-11-02 12:44:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56963, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54963 - generate_family_file.py: WARNING: Api does not seem to be enabled
generate_family_file.py: WARNING: Api does not seem to be enabled
Status: REOPENED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Low enhancement
: ---
Assigned To: Pywikipedia bugs
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-04 09:47 UTC by Nemo
Modified: 2014-11-02 12:44 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nemo 2013-10-04 09:47:45 UTC
$ 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)
Comment 1 Nemo 2013-10-04 09:49:38 UTC
Note that I gave http as input and it used https, despite no redirect being in place.
Comment 2 Betacommand 2013-10-04 09:52:18 UTC
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.
Comment 3 Merlijn van Deen (test) 2013-10-04 10:00:54 UTC
It would also be useful to understand direct api urls. Re-opening as feature request.
Comment 4 John Mark Vandenberg 2014-09-18 10:15:00 UTC
In core, the logic in FamilyFileGenerator can be migrated into AutoFamily and APISite, which already understands /api.php URLs, and can access the API.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links