https://bugzilla.wikimedia.org/show_bug.cgi?id=72047
Bug ID: 72047 Summary: archivebot problems on cswiki Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: major Priority: Unprioritized Component: archivebot.py Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jan.dudik@gmail.com Web browser: --- Mobile Platform: ---
Some errors causes tahat not all pages should be correctly archived
I:\py\rewrite>pwb.py archivebot archive -lang:cs ...
1) incorrect month name, but this string "06." is in page only in urls :
Processing [[cs:Diskuse s wikipedistou:JAn Dudík]] incorrect month name "06." in page in site wikipedia:cs ERROR: Error occured while processing page [[cs:Diskuse s wikipedistou:JAn Dudík ]] ERROR: KeyError: Traceback (most recent call last): File "I:\py\rewrite\scripts\archivebot.py", line 614, in main archiver = PageArchiver(pg, a, salt, force) File "I:\py\rewrite\scripts\archivebot.py", line 383, in __init__ self.page = DiscussionPage(page, self) File "I:\py\rewrite\scripts\archivebot.py", line 293, in __init__ self.load_page() File "I:\py\rewrite\scripts\archivebot.py", line 321, in load_page cur_thread.feed_line(line) File "I:\py\rewrite\scripts\archivebot.py", line 238, in feed_line timestamp = self.ts.timestripper(line) File "I:\py\rewrite\pywikibot\textlib.py", line 1321, in timestripper raise KeyError KeyError
2) attributeError: 'NoneType' object has no attribute 'group' Processing [[cs:Diskuse s wikipedistou:JeremySil]] 19 Threads found on [[cs:Diskuse s wikipedistou:JeremySil]] Looking for: {{archivace}} in [[cs:Diskuse s wikipedistou:JeremySil]] ERROR: Error occured while processing page [[cs:Diskuse s wikipedistou:JeremySil ]] ERROR: AttributeError: 'NoneType' object has no attribute 'group' Traceback (most recent call last): File "I:\py\rewrite\scripts\archivebot.py", line 615, in main archiver.run() File "I:\py\rewrite\scripts\archivebot.py", line 493, in run whys = self.analyze_page() File "I:\py\rewrite\scripts\archivebot.py", line 453, in analyze_page max_arch_size = str2size(self.get_attr('maxarchivesize')) File "I:\py\rewrite\scripts\archivebot.py", line 173, in str2size val, unit = (int(r.group(1)), r.group(2)) AttributeError: 'NoneType' object has no attribute 'group'
3) When archive is in another path, bot fails:
Processing [[cs:Wikipedie:Byrokraté/Nástěnka]] 29 Threads found on [[cs:Wikipedie:Byrokraté/Nástěnka]] Looking for: {{archivace}} in [[cs:Wikipedie:Byrokraté/Nástěnka]] Processing 29 threads ERROR: Error occured while processing page [[cs:Wikipedie:Byrokraté/Nástěnka]] ERROR: ArchiveSecurityError: Archive page [[cs:Wikipedie:Byrokraté/Archiv1]] doe s not start with page title (Wikipedie:Byrokraté/Nástěnka)! Traceback (most recent call last): File "I:\py\rewrite\scripts\archivebot.py", line 615, in main archiver.run() File "I:\py\rewrite\scripts\archivebot.py", line 493, in run whys = self.analyze_page() File "I:\py\rewrite\scripts\archivebot.py", line 481, in analyze_page if self.feed_archive(archive, t, max_arch_size, params): File "I:\py\rewrite\scripts\archivebot.py", line 447, in feed_archive % (archive, self.page.title())) ArchiveSecurityError: Archive page [[cs:Wikipedie:ByrokratĂ?/Archiv1]] does not start with page title (Wikipedie:ByrokratĂ?/NástÄ?nka)!
4) unknown interwiki prefixes c: and outreach: Processing [[cs:Wikipedie:Nástěnka správců]] 52 Threads found on [[cs:Wikipedie:Nástěnka správců]] Looking for: {{archivace}} in [[cs:Wikipedie:Nástěnka správců]] Processing 52 threads 127 Threads found on [[cs:Wikipedie:Nástěnka správců/Archiv58]] Archiving 23 thread(s). ERROR: Error occured while processing page [[cs:Wikipedie:Nástěnka správců]] ERROR: SiteDefinitionError: :c:User:Martinnovacek.cz is not a local page on wiki pedia:cs, and the interwiki prefix c is not supported by PyWikiBot! Traceback (most recent call last): File "I:\py\rewrite\scripts\archivebot.py", line 615, in main archiver.run() File "I:\py\rewrite\scripts\archivebot.py", line 509, in run self.archives[a].update(comment) File "I:\py\rewrite\scripts\archivebot.py", line 358, in update self.save(summary) File "I:\py\rewrite\pywikibot\tools.py", line 516, in wrapper return obj(*__args, **__kw) File "I:\py\rewrite\pywikibot\page.py", line 985, in save **kwargs) File "I:\py\rewrite\pywikibot\page.py", line 993, in _save comment = self._cosmetic_changes_hook(comment) or comment File "I:\py\rewrite\pywikibot\page.py", line 1040, in _cosmetic_changes_hook self.text = ccToolkit.change(old) File "I:\py\rewrite\scripts\cosmetic_changes.py", line 228, in change new_text = self._change(text) File "I:\py\rewrite\scripts\cosmetic_changes.py", line 221, in _change text = self.safe_execute(method, text) File "I:\py\rewrite\scripts\cosmetic_changes.py", line 199, in safe_execute result = method(text) File "I:\py\rewrite\scripts\cosmetic_changes.py", line 548, in cleanUpLinks 'startspace']) File "I:\py\rewrite\pywikibot\textlib.py", line 224, in replaceExcept replacement = new(match) File "I:\py\rewrite\scripts\cosmetic_changes.py", line 442, in handleOneLink namespace = page.namespace() File "I:\py\rewrite\pywikibot\page.py", line 157, in namespace return self._link.namespace File "I:\py\rewrite\pywikibot\page.py", line 4153, in namespace self.parse() File "I:\py\rewrite\pywikibot\page.py", line 4069, in parse self._text, self._site, prefix)) SiteDefinitionError: :c:User:Martinnovacek.cz is not a local page on wikipedia:c s, and the interwiki prefix c is not supported by PyWikiBot!
Processing [[cs:Wikipedie:Pod lípou (návrhy)]] 12 Threads found on [[cs:Wikipedie:Pod lípou (návrhy)]] Looking for: {{archivace}} in [[cs:Wikipedie:Pod lípou (návrhy)]] Processing 12 threads 14 Threads found on [[cs:Wikipedie:Pod lípou (návrhy)/Archiv 2014-01]] Archiving 2 thread(s). ERROR: Error occured while processing page [[cs:Wikipedie:Pod lípou (návrhy)]] ERROR: SiteDefinitionError: :outreach:Welcome to Wikipedia (Bookshelf)/2013 edit ion/text is not a local page on wikipedia:cs, and the interwiki prefix outreach is not supported by PyWikiBot! Traceback (most recent call last): File "I:\py\rewrite\scripts\archivebot.py", line 615, in main archiver.run() File "I:\py\rewrite\scripts\archivebot.py", line 509, in run self.archives[a].update(comment) File "I:\py\rewrite\scripts\archivebot.py", line 358, in update self.save(summary) File "I:\py\rewrite\pywikibot\tools.py", line 516, in wrapper return obj(*__args, **__kw) File "I:\py\rewrite\pywikibot\page.py", line 985, in save **kwargs) File "I:\py\rewrite\pywikibot\page.py", line 993, in _save comment = self._cosmetic_changes_hook(comment) or comment File "I:\py\rewrite\pywikibot\page.py", line 1040, in _cosmetic_changes_hook self.text = ccToolkit.change(old) File "I:\py\rewrite\scripts\cosmetic_changes.py", line 228, in change new_text = self._change(text) File "I:\py\rewrite\scripts\cosmetic_changes.py", line 221, in _change text = self.safe_execute(method, text) File "I:\py\rewrite\scripts\cosmetic_changes.py", line 199, in safe_execute result = method(text) File "I:\py\rewrite\scripts\cosmetic_changes.py", line 548, in cleanUpLinks 'startspace']) File "I:\py\rewrite\pywikibot\textlib.py", line 224, in replaceExcept replacement = new(match) File "I:\py\rewrite\scripts\cosmetic_changes.py", line 442, in handleOneLink namespace = page.namespace() File "I:\py\rewrite\pywikibot\page.py", line 157, in namespace return self._link.namespace File "I:\py\rewrite\pywikibot\page.py", line 4153, in namespace self.parse() File "I:\py\rewrite\pywikibot\page.py", line 4069, in parse self._text, self._site, prefix)) SiteDefinitionError: :outreach:Welcome to Wikipedia (Bookshelf)/2013 edition/tex t is not a local page on wikipedia:cs, and the interwiki prefix outreach is not supported by PyWikiBot!