On 15 March 2012 12:53, Chris Watkins <[email protected]> wrote: > File "/home/cwg23/pwb/pywikibot/textlib.py", line 175, in replaceExcept > match.group(groupID) + \ > IndexError: no such group > no such group > 0 pages were changed.
On a more generic note; for debugging such issues, using pdb (the python debugger) can be useful. It does require being able to understand written python code. For example, in your case, you could do the following python -m pdb replace.py <....> > /home/valhallasw/src/pywikipedia/trunk/replace.py(145)<module>() -> """ (Pdb) b pywikibot/textlib.py:175 Breakpoint 1 at /home/valhallasw/src/pywikipedia/trunk/pywikibot/textlib.py:175 (Pdb) c (..output follows..) Then when the error hits, the code will pause instead of continuing, allowing you to view variables, such as 'match'. The only problem with this is the high 'black magic' content in replaceExcept.py. In any case, I think this problem probably happens more often and could thus use a clearer error message. Best, Merlijn _______________________________________________ Pywikipedia-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
