[Pywikipedia-l] [ pywikipediabot-Bugs-1967922 ] cosmetic_change fails to get title ?

SourceForge.net noreply at sourceforge.net
Tue May 20 21:36:32 UTC 2008


Bugs item #1967922, was opened at 2008-05-20 14:41
Message generated for change (Settings changed) made by nicdumz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1967922&group_id=93107

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: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: DarkoNeko (darkoneko)
>Assigned to: NicDumZ — Nicolas Dumazet (nicdumz)
Summary: cosmetic_change fails to get title ?

Initial Comment:
Version used: latest
system used : linux (toolserver)

A full text version of the problem is avalaible here :  http://fr.wikipedia.org/wiki/Utilisateur:Darkoneko/bug2008-05-20

<b>summary :</b> 
cosmetic_changes.py (or maybe wikipedia.py) fails to keep the title at some point.
Up to now, the problem only happened on the page [[fr:Berlin, Berlin]]

<b>command & trace</b>
python replace.py -summary:wikication -regex "(?i)\n<tt>.*?</tt> *:*(.*?)<br ?/?> *" "\n#\1" -page:"Berlin, Berlin"

(...)

Do you want to accept these changes? ([y]es, [N]o, [a]ll) y
Saving page [[Berlin, Berlin]] failed:
Traceback (most recent call last):
  File "/home/darkoneko/pywikipedia/wikipedia.py", line 6100, in async_put
    page.put(newtext, comment, watchArticle, minorEdit, force)
  File "/home/darkoneko/pywikipedia/wikipedia.py", line 1246, in put
    newtext = ccToolkit.change(newtext)
  File "/home/darkoneko/pywikipedia/cosmetic_changes.py", line 104, in change
    text = self.cleanUpLinks(text)
  File "/home/darkoneko/pywikipedia/cosmetic_changes.py", line 270, in cleanUpLinks
    text = wikipedia.replaceExcept(text, linkR, handleOneLink, ['comment', 'math', 'nowiki', 'pre', 'startspace'])
  File "/home/darkoneko/pywikipedia/wikipedia.py", line 3130, in replaceExcept
    replacement = new(match)
  File "/home/darkoneko/pywikipedia/cosmetic_changes.py", line 184, in handleOneLink
    page = wikipedia.Page(self.site, titleWithSection)
  File "/home/darkoneko/pywikipedia/wikipedia.py", line 357, in __init__
    raise Error(u"Invalid title '%s'" % title )
Error: Invalid title '  '

----------------------------------------------------------------------

>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-05-20 23:36

Message:
Logged In: YES 
user_id=1963242
Originator: NO

Well, yes, there was "[[  ]]" in the page, and we were badly handling
invalid titles in cosmetic_changes.

This has been fixed in r5416.

Thanks for the report :=)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1967922&group_id=93107



More information about the Pywikipedia-l mailing list