Hi,
this is an annoying compat screen:
WARNING: Family file wikipedia contains version number 1.26wmf11, but it should be 1.28.0-wmf.15 WARNING: Outdated family file wikipedia: namespace['hu'][90] is 'Téma', but should be 'Szál' WARNING: Outdated family file wikipedia: namespace['hu'][91] is 'Témavita', but should be 'Szálvita' WARNING: Missing namespace in family file wikipedia: namespace['hu'][2300] (it is set to 'Gadget') WARNING: Missing namespace in family file wikipedia: namespace['hu'][2301] (it is set to 'Gadget talk') WARNING: Missing namespace in family file wikipedia: namespace['hu'][2302] (it is set to 'Gadget definition') WARNING: Missing namespace in family file wikipedia: namespace['hu'][2303] (it is set to 'Gadget definition talk') WARNING: Missing namespace in family file wikipedia: namespace['hu'][2600] (it is set to 'Téma')
Once the bot can determine the version namespaces on its own, * why does it take version and namespaces from family * why does it complain instead of working? * what problem will I experience?
When I work on 2000 pages, the bot yields this almost important message at every 60 pages and floods my screen. Also it spends my time with checking this at every 60 pages. I never understood this behaviour.
On 21 August 2016 at 11:55, Bináris wikiposta@gmail.com wrote:
Once the bot can determine the version namespaces on its own,
* why does it take version and namespaces from family
Historical reasons. Mostly because this information was not easily available in the screen-scraping era, but also because it allows the bot to normalize page titles without connecting to the wiki.
- why does it complain instead of working?
Historical reasons. Mostly to make sure the family file is updated.
- what problem will I experience?
The bot might not understand links to newer namespaces. The version number is not likely to have any direct impact.
Merlijn
Some other aspects: family files works like a cache for some settings including namespaces and its aliases and version strings. This leads to a very quick system but it is necessary to update these setting from time to time. I did it once a week in past or more until I switched to core completely. You may update family settings by yourself and might commit changes to gerrit if you want to. The version string is inside family.py. For namespaces you can use the maintenance script update_namespaces.py; it is not the best implementation due to some overlapping but good enough to handle with all namespaces again. I had a modified one to solve this problems but it is not good enough to publish it and with core branch I do not see any advantage to support it anymore.
Core uses all these information via api as you proposed. At a very early state this lead to a very slow system until cached requests where implemented. Anyway an Internet connection is almost needed using core.
Best xqt
Am 21.08.2016 um 14:24 schrieb Merlijn van Deen (valhallasw) valhallasw@arctus.nl:
On 21 August 2016 at 11:55, Bináris wikiposta@gmail.com wrote: Once the bot can determine the version namespaces on its own,
- why does it take version and namespaces from family
Historical reasons. Mostly because this information was not easily available in the screen-scraping era, but also because it allows the bot to normalize page titles without connecting to the wiki.
- why does it complain instead of working?
Historical reasons. Mostly to make sure the family file is updated.
- what problem will I experience?
The bot might not understand links to newer namespaces. The version number is not likely to have any direct impact.
Merlijn _______________________________________________ pywikibot mailing list pywikibot@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot
Thank you for the answers, now it's clear.
2016-08-23 8:18 GMT+02:00 info info@gno.de:
I did it once a week in past or more until I switched to core completely.
I remember, in those times I still watched notifications from SVN.
2016-08-23 8:18 GMT+02:00 info info@gno.de:
The version string is inside family.py.
I couldn't find it. Neither searching for "wmf", nor for "1.26".
For namespaces you can use the maintenance script update_namespaces.py;
No such script in my copy. I tried to edit family file manually with Notepad++, but for my surprise I found an ANSI-coded file with strange character combinations in Hungarian names, and they remain that way after converting to UTF-8. (Although the forst line contains utf-8 coding, but the file itself is not UTF-8 anyway.)
E.g. self.namespaces[90] = { 'hu': u'TĂ©ma', but the bot recognizes it as Téma (which is the correct spelling). How is that possible? I didn't dare to edit after this.
----- Original Nachricht ---- Von: Bináris wikiposta@gmail.com An: Pywikibot discussion list pywikibot@lists.wikimedia.org Datum: 24.08.2016 07:39 Betreff: Re: [pywikibot] Crying about wrong namespace names
2016-08-23 8:18 GMT+02:00 info info@gno.de:
The version string is inside family.py.
I couldn't find it. Neither searching for "wmf", nor for "1.26".
We are speaking about compat? patch supplied in https://gerrit.wikimedia.org/r/#/c/306409/
For namespaces you can use the maintenance script update_namespaces.py;
No such script in my copy. I tried to edit family file manually with
That script is inside the maintenance folder
Notepad++, but for my surprise I found an ANSI-coded file with strange character combinations in Hungarian names, and they remain that way after converting to UTF-8. (Although the forst line contains utf-8 coding, but the file itself is not UTF-8 anyway.)
E.g. self.namespaces[90] = { 'hu': u'T?©ma', but the bot recognizes it as Téma (which is the correct spelling). How is that possible? I didn't dare to edit after this.
Might be settings in notepad is wrong. Choose "UTF-8 without BOM" in the "Coding" menu. I guess that is the en localisation. It is the 5th menu, my german language setting says "Kodierung" -> "UTF-8 ohne BOM". Hope that helps.
Better use idle instead which comes with python. Right-click the .py file and choose "Edit with IDLE" from the context menu.
-- Bináris
Best
xqt