Is this a replace.py error or an xmlreader.py error or a dump error?
Reading XML dump...
Traceback (most recent call last):
File "C:\Program Files\Pywikipedia\pagegenerators.py", line 1255, in
__iter__
for page in self.wrapped_gen:
File "C:\Program Files\Pywikipedia\pagegenerators.py", line 1157, in
Duplicate
FilterPageGenerator
for page in generator:
File "replace.py", line 259, in __iter__
for entry in self.parser:
File "C:\Program Files\Pywikipedia\xmlreader.py", line 313, in new_parse
for event, elem in context:
File "<string>", line 68, in __iter__
SyntaxError: no element found: line 27487351, column 9
no element found: line 27487351, column 9
0 titles were saved.
--
Bináris
Hi everybody.
I have problem with this script. I saved textual file with future
articles in UTF-8, but instead of Cyrillic letters, I got
СамиÑ? Ð?аÑ?аÑ?.
This is a nice script, I like the idea, thanks. Some remarks:
2011/6/12 <multichill(a)svn.wikimedia.org>
> http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9294
> +-alway (not implemented yet) Don't ask, just do the edit.
>
A small typo in always.
> +__version__ = '$Id: create_categories.py 9042 2011-03-13 10:14:47Z xqt $'
>
Must have remained in accidentally, as well as a long series of unused
imports.
> + newpage = pywikibot.Page(pywikibot.getSite(u'commons', u'commons'),
> + u'Category:' + basename + u' ' + title)
>
At this point, it seems to work only for Commons, and not using the -lang
and -family parameters given in the example.
> + newtext = u''
> + newtext += u'[[Category:' + parent + u'|' + title + u']]\n'
>
While "Category" works for all wikiprojects as default,
site.namespace(14)would be more appropriate for use outside of Commons
(preventing the bot
owner of getting angry messages pointing out the advantages of mother
tongue).
> + newtext += u'[[Category:' + title + u']]\n'
>
This should be optional. In other wikis it is not sure that all the topics
have an own category; as a matter of fact, I looked at
User:Multichill/Wallonia in Commons that has also a few red links.
--
Bináris
Hi guys,
Fun and useful thing to implement: A isHidden() function for the
category object. Who feels like implementing this? You don't have to
actually get the fulltext of the category to see if it's hidden, you
should be able to get it like
http://commons.wikimedia.org/w/api.php?action=query&generator=categories&ti…
Maarten