Last modified: 2014-11-07 12:56:33 UTC
D:\Py\rewrite>pwb.py interwiki -family:wiktionary -cleanup -start:category:Finština -array:50 -query:30 -untranslated NOTE: Number of pages queued is 0, trying to add 30 more. Retrieving 30 pages from wiktionary:cs. ERROR: Traceback (most recent call last): File "D:\Py\rewrite\pywikibot\data\api.py", line 584, in submit headers=headers, body=body) File "D:\Py\rewrite\pywikibot\tools.py", line 549, in wrapper return obj(*__args, **__kw) File "D:\Py\rewrite\pywikibot\comms\http.py", line 232, in request host = site.ssl_hostname() File "D:\Py\rewrite\pywikibot\site.py", line 550, in <lambda> f = lambda *args, **kwargs: method(self.code, *args, **kwargs) File "D:\Py\rewrite\pywikibot\family.py", line 994, in ssl_hostname return self.hostname(code) File "D:\Py\rewrite\pywikibot\family.py", line 990, in hostname return self.langs[code] KeyError: u'za' WARNING: Waiting 5 seconds before retrying. ... WARNING: Waiting 10 seconds before retrying. etc. note:the only file containing "u'Za'" is imageuncat.py
I found connection with https://bugzilla.wikimedia.org/show_bug.cgi?id=71115 When is in some page present old interwiki to za:, bot have this problem and cannot continue after https://cs.wiktionary.org/w/index.php?title=Kategorie:Francouzština&diff=prev&oldid=531361 this edit bot works as expected
Similar problem with language on incubator
(In reply to JAn Dudík from comment #2) > Similar problem with language on incubator I mean when is in page interwiki to non existing wiktionary ([[wikt:bar:Category:Foo]] does not exist neither allone nor in incubator) bot crashes example: https://csb.wiktionary.org/w/index.php?title=Kategòrëjô:Jãzëczi&curid=1825&diff=28265&oldid=28259
... Retrieving 30 pages from wiktionary:de. Dump cs (wiktionary) written. Traceback (most recent call last): File "D:\Py\rewrite\pwb.py", line 178, in <module> run_python_file(fn, argv, argvu) File "D:\Py\rewrite\pwb.py", line 75, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "D:\Py\rewrite\scripts\interwiki.py", line 2646, in <module> main() File "D:\Py\rewrite\scripts\interwiki.py", line 2621, in main bot.run() File "D:\Py\rewrite\scripts\interwiki.py", line 2365, in run self.queryStep() File "D:\Py\rewrite\scripts\interwiki.py", line 2338, in queryStep self.oneQuery() File "D:\Py\rewrite\scripts\interwiki.py", line 2328, in oneQuery for page in gen: File "D:\Py\rewrite\pywikibot\site.py", line 2430, in preloadpages api.update_page(page, pagedata, rvgen.props) File "D:\Py\rewrite\pywikibot\data\api.py", line 1480, in update_page source=page.site) File "D:\Py\rewrite\pywikibot\page.py", line 4371, in langlinkUnsafe link._site = pywikibot.Site(lang, source.family.name) File "D:\Py\rewrite\pywikibot\__init__.py", line 573, in Site _sites[key] = interface(code=code, fam=fam, user=user, sysop=sysop) File "D:\Py\rewrite\pywikibot\site.py", line 1399, in __init__ BaseSite.__init__(self, code, fam, user, sysop) File "D:\Py\rewrite\pywikibot\site.py", line 439, in __init__ % (self.__code, self.__family.name)) pywikibot.exceptions.UnknownSite: Language ht does not exist in family wiktionary <class 'pywikibot.exceptions.UnknownSite'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort Bot should ignore <s>or remove</s> such link (ht:wiktionary exists on incubator)
What does the link look like in the incubator?
(In reply to Fabian from comment #5) > What does the link look like in the incubator? [[wikt:ht:Kategori:Lang]] -> [[incubator:Wt/ht/Kategori:Lang]] https://de.wiktionary.org/w/index.php?title=Kategorie:Sprachen&diff=prev&oldid=4000105
Ah interesting. wikt:ht:X in the English Wikipedia is the same as ht:X in the English Wiktionary and while doesn't show a 'ht' interwiki prefix, the api does: http://en.wiktionary.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap If you search for '"ht"' (with the double quotes) you find an entry which links to ht.wiktionary.org which itself redirects to the incubator. When pwb is now analysing the link it thinks 'ht.wiktionary.org' is a wiktionary although it's on the incubator. So somehow our families system need to identify this because I don't know if a script could figure it out on it's own. So similar to the current obsolete system where one old language is referenced to a new one, the new system not only needs to reference to a new language but new site. What we can't do is using the 'ht.wiktionary.org' as if nothing is happening: http://ht.wiktionary.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap does not return an api call.