I've done some debugging and this is what I've found so far:
1) the key error 104 is thrown because _namespaces[104] does not exist as a dict entry in
site.py code (I enjoy the humor of the error message number and the index to the
_namespaces dict being the same number!)
2) I found out that namespace ID 104 is from Semantic MediaWiki (which I have installed)
but is no longer used.
3) So, it appears as though it is a bug related to SMW rather than pywikibot. It seems
like the easy work around is just to create the 104 and 105 namespaces (unless they are
already there [how do I find that out?]...and, being a newbie, I haven't created a
namespace yet....more to learn!). What seems like the better fix, though, is to determine
where pywikibot is picking up the namespace id's from and have it not search for 104
and 105. I'm now searching for that info, but if anyone knows that and can respond, I
would appreciate it.
Thanks,Bud
From: "info(a)gno.de" <info(a)gno.de>
To: bloveall(a)yahoo.com; pywikibot(a)lists.wikimedia.org
Sent: Saturday, September 10, 2016 4:21 AM
Subject: Aw: [pywikibot] Newbie Q: Error running add_text script for first time
Could you geve us your family and site you worked on. And the result of pwb.py version
Thanks
xqt
----- Original Nachricht ----
Von: Bud <bloveall(a)yahoo.com>
An: "pywikibot(a)lists.wikimedia.org" <pywikibot(a)lists.wikimedia.org>
Datum: 10.09.2016 02:54
Betreff: [pywikibot] Newbie Q: Error running add_text script for first time
Hi All,
I'm new to Pywikibot (and Mediawiki as well). I've used the instructions on
[0] to install pywikibot on my Windows laptop accessing a Linux server. All
seems to be connected right (I'm successfully through step 9 and can login).
The next step is to run add_text to change text on some pages. Here I get an
error:
C:\Users\Owner\pywikibot>python pwb.py add_text.py -cat:Testing
-text:"Testing the add_text script using the Pywikibot user."
-except:"\{\{([Tt]emplate:|)[Dd]ocumentation [Ss]ubpage" -upTraceback (most
recent call last): File "pwb.py", line 270, in <module> if not
main():
File "pwb.py", line 264, in main run_python_file(filename, [filename] +
args, argvu, file_package) File "pwb.py", line 109, in run_python_file
main_mod.__dict__) File ".\scripts\add_text.py", line 358, in <module>
main() File ".\scripts\add_text.py", line 338, in main
genFactory.handleArg(arg) File
"C:\Users\Owner\pywikibot\pywikibot\pagegenerators.py", line 589, in
handleArg gen = self.getCategoryGen(arg,
gen_func=CategorizedPageGenerator) File
"C:\Users\Owner\pywikibot\pywikibot\pagegenerators.py", line 420, in
getCategoryGen if prefix not in self.site.namespaces[14]: File
"C:\Users\Owner\pywikibot\pywikibot\site.py", line 806, in namespaces
self._namespaces = _NamespacesDict(self._build_namespaces()) File
"C:\Users\Owner\pywikibot\pywikibot\site.py", line 2185, in
_build_namespaces if item['*'] not in _namespaces[ns]:KeyError: 104<class
'KeyError'>CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c
to abort
I've verified the Category name exists and is spelled correctly. Not sure
what to try next to figure this out. Any help is appreciated.
Thanks,Bud Loveall
P.S. Also, is there a way to search the archives of the mail list? I'm
guessing this has been answered before.
--------------------------------
_______________________________________________
pywikibot mailing list
pywikibot(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot