Bugs item #3487492, was opened at 2012-02-14 00:19 Message generated for change (Comment added) made by binbot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3487492...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: solve_disambiguation Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: dmitrynikitin () Assigned to: Nobody/Anonymous (nobody) Summary: solve_disamgiguation don't work in ru.wiki
Initial Comment: Pywikipedia [http] trunk/pywikipedia (r9895, 2012/02/14, 08:02:54) Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] config-settings: use_api = True use_api_login = True unicode test: ok -------------------------------------------------- solve_disambiguation don't work with non-latin titles
$ python ../../wiki/pywikipedia/solve_disambiguation.py Я
0 - Ивановская область 1 - Паровоз Я 2 - Паровоз Я-01 3 - Пляцковский, Михаил Спартакович 4 - Я (Эго) 5 - Я (кана) 6 - Я (кириллица) 7 - Я (местоимение) 8 - Я (сок) 9 - Я (философия) 10 - Я (фильм) 11 - Я.ру 12 - Якутия 13 - Яндекс 14 - Ярославль 15 - Ярославский автомобильный завод 16 - якорь 17 - ямб
Getting references to [[Я]] via API... Traceback (most recent call last): File "/export3/wiki/pywikipedia/pagegenerators.py", line 1182, in __iter__ for page in self.wrapped_gen: File "../../wiki/pywikipedia/solve_disambiguation.py", line 413, in __iter__ refs = [page for page in generator] File "/export3/wiki/pywikipedia/pagegenerators.py", line 1062, in PageTitleFilterPageGenerator for page in generator: File "/export3/wiki/pywikipedia/pagegenerators.py", line 610, in ReferringPageGenerator onlyTemplateInclusion): File "/export3/wiki/pywikipedia/wikipedia.py", line 1437, in getReferences pg = Page(self.site(), blp['title'], defaultNamespace = blp['ns']) File "/export3/wiki/pywikipedia/wikipedia.py", line 404, in __init__ t = u'%s:%s' % (self._site.namespace(self._namespace), t) File "/export3/wiki/pywikipedia/wikipedia.py", line 7618, in namespace return self.family.namespace(self.lang, num, all = all) File "/export3/wiki/pywikipedia/family.py", line 3728, in namespace raise KeyError('ERROR: title for namespace %d in language %s unknown' % (ns_number, code)) KeyError: 'ERROR: title for namespace 104 in language ru unknown' 'ERROR: title for namespace 104 in language ru unknown'
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2012-02-14 05:15
Message: Compare http://ru.wikipedia.org/w/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%... which has a few links from namespace 104 and http://ru.wikipedia.org/w/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%..., which has none. That's why it works for you, not the Latin letters.
----------------------------------------------------------------------
Comment By: Bináris (binbot) Date: 2012-02-14 05:12
Message: Hmm, sounds interesting. It works for me, see the attached screenshot. (Sorry for encoding, I don't have Russian command line.) Namespace 104 has really recently been added to family file, I suspect the problem here anyway.
Differenc between Я and Z may not be in Latin/Cyrillic, rather which of them is linked from namespace "Проект".
----------------------------------------------------------------------
Comment By: dmitrynikitin () Date: 2012-02-14 04:43
Message: the same command w/ latin title works ok. for example, python ../../wiki/pywikipedia/solve_disambiguation.py Z
----------------------------------------------------------------------
Comment By: dmitrynikitin () Date: 2012-02-14 04:42
Message: $ ls -la families/wikipedia_family.py -rw-r--r-- 1 dnikitin uucp 66447 2012-02-14 12:30 families/wikipedia_family.py
----------------------------------------------------------------------
Comment By: Bináris (binbot) Date: 2012-02-14 01:05
Message: This is not about Russian titles. It clearly states: title for namespace 104 in language ru unknown. Make sure you update the whole distribution, not only root directory of Pywikipedia. Check the directory /families for wikipedia_family.py. Is it later then Mon Feb 13 10:02:32 2012 UTC?
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3487492...