On Tue, Jun 14, 2011 at 12:28 PM, Russell Blau <russblau(a)imapmail.org>wrote;wrote:
That should fail; it would equally fail if you tried
myCat = pywikibot.Category(mySite, "Garbage")
since "Garbage" is not in the Category namespace. In other words, the fact
that the category title starts with "Wikipedia:" has nothing to do with it.
Hm, I struggle to understand why your example is supposed to fail, it
attempts to create a Page object with title "Garbage" and ns=14, that's a
perfectly valid page, isn't it? (except that myCat.exists() returns False,
of course, as expected)
However, this should work:
myCat = pywikibot.Category(mySite, "Kategori:Wikipedia:Globalt
Yes, that does work, so I've chosen to go with the straightforward
workaround that I'll prefix any category name with site.category_namespace()
and ":". That's partly why I chose to post to the list, in case
just be defined as expected behaviour, I have no problem with having to
qualify the names that way :)
Creating it as a page with namespace set to 14 results
myPage = pywikibot.Page(mySite, 'Wikipedia:Globalt
>> print myPage.title();
>> print myPage.namespace();
The title's namespace overrides the given option, which itsn't what I
That one does seem like a bug. The namespace number ought to match the
actual title. I'll investigate further.
Thanks, let me know if there's anything I can do to help!