https://bugzilla.wikimedia.org/show_bug.cgi?id=72846
Bug ID: 72846 Summary: generate_family_file.py fails on wiki-en.genealogy.net Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jayvdb@gmail.com Web browser: --- Mobile Platform: ---
$ python ./generate_family_file.py http://wiki-en.genealogy.net/Main_Page gene Generating family file from http://wiki-en.genealogy.net/Main_Page http://wiki-en.genealogy.net/Main_Page Traceback (most recent call last): File "./generate_family_file.py", line 319, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "./generate_family_file.py", line 95, in run w = Wiki(self.base_url) File "./generate_family_file.py", line 242, in __init__ uo = urlopen(fromurl) File "./generate_family_file.py", line 47, in urlopen uo = urllib2.urlopen(req) File "/usr/lib64/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/usr/lib64/python2.7/urllib2.py", line 410, in open response = meth(req, response) File "/usr/lib64/python2.7/urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python2.7/urllib2.py", line 448, in error return self._call_chain(*args) File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/usr/lib64/python2.7/urllib2.py", line 531, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 504: Gateway Time-out
$ python ./generate_family_file.py http://wiki-en.genealogy.net/Main_Page gene Generating family file from http://wiki-en.genealogy.net/Main_Page http://wiki-en.genealogy.net/Main_Page Traceback (most recent call last): File "./generate_family_file.py", line 319, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "./generate_family_file.py", line 95, in run w = Wiki(self.base_url) File "./generate_family_file.py", line 242, in __init__ uo = urlopen(fromurl) File "./generate_family_file.py", line 47, in urlopen uo = urllib2.urlopen(req) File "/usr/lib64/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/usr/lib64/python2.7/urllib2.py", line 410, in open response = meth(req, response) File "/usr/lib64/python2.7/urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python2.7/urllib2.py", line 448, in error return self._call_chain(*args) File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/usr/lib64/python2.7/urllib2.py", line 531, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 504: Gateway Time-out
It works a bit better on wiki-de.genealogy.net
$ python ./generate_family_file.py http://wiki-de.genealogy.net/Main_Page gene Generating family file from http://wiki-de.genealogy.net/Main_Page http://wiki-de.genealogy.net/Main_Page
================================== api url: http://wiki-de.genealogy.net/w/api.php MediaWiki version: 1.14.1 ==================================
Determining other languages...http://wiki-de.genealogy.net/w/api.php?action=query&meta=siteinfo&si... de en nl sv
There are 4 languages available. Do you want to generate interwiki links? This might take a long time. ([y]es/[N]o/[e]dit)y Loading wikis... * de... in cache * en... http://wiki-en.genealogy.net/ HTTP Error 504: Gateway Time-out * nl... http://wiki-nl.genealogy.net/wiki/ downloaded * sv... http://wiki-sv.genealogy.net/ HTTP Error 500: Internal Server Error Writing pywikibot/families/gene_family.py...
The resulting family file only includes nl and de
# -*- coding: utf-8 -*- """ This family file was auto-generated by $Id: 185033971c163ea46b2b1904773b8c407069a4d0 $ Configuration parameters: url = http://wiki-de.genealogy.net/Main_Page name = gene
Please do not commit this to the Git repository! """
from pywikibot import family
class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'gene' self.langs = { 'nl': 'wiki-nl.genealogy.net', 'de': 'wiki-de.genealogy.net', }
def scriptpath(self, code): return { 'nl': '/w', 'de': '/w', }[code]
def version(self, code): return { 'nl': u'1.14.1', 'de': u'1.14.1', }[code]
http://wiki-en.genealogy.net/w/api.php and http://wiki-en.genealogy.net/w/api.php fail
http://wiki-sv.genealogy.net/w/api.php works for me
https://bugzilla.wikimedia.org/show_bug.cgi?id=72846
--- Comment #1 from John Mark Vandenberg jayvdb@gmail.com --- It also doesnt find http://wiki-commons.genealogy.net/Hauptseite
https://bugzilla.wikimedia.org/show_bug.cgi?id=72846
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=72847
https://bugzilla.wikimedia.org/show_bug.cgi?id=72846
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |72873
pywikipedia-bugs@lists.wikimedia.org