https://bugzilla.wikimedia.org/show_bug.cgi?id=59790
Web browser: --- Bug ID: 59790 Summary: cosmetic changes cannot import name Category Product: Pywikibot Version: compat (1.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: Cosmetic changes Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jan.dudik@gmail.com Classification: Unclassified Mobile Platform: ---
running interwiki bot with cosmetic:changes enabled (for cs:, disabled for de: in this example) causes bot crash. With disabled cosmetic:changes it works correctly:
interwiky.py -family:wiktionary -lang:sk jídlo ....
======Post-processing [[sk:jídlo]]====== Updating links on page [[de:jídlo]]. Changes to be made: Robot: Přidávám [[chr:jídlo]], [[sk:jídlo]] + [[chr:jídlo]] + [[sk:jídlo]]
NOTE: Updating live wiki... Updating page [[de:jídlo]] via API Updating links on page [[cs:jídlo]]. Changes to be made: Robot: Přidávám [[chr:jídlo]], [[sk:jídlo]] + [[chr:jídlo]] + [[sk:jídlo]]
NOTE: Updating live wiki... Dump sk (wiktionary) appended. Traceback (most recent call last): File "I:\py\interwiki.py", line 2658, in <module> main() File "I:\py\interwiki.py", line 2632, in main bot.run() File "I:\py\interwiki.py", line 2350, in run self.queryStep() File "I:\py\interwiki.py", line 2328, in queryStep subj.finish() File "I:\py\interwiki.py", line 1766, in finish if self.replaceLinks(page, new): File "I:\py\interwiki.py", line 2007, in replaceLinks comment=mcomment) File "I:\py\wikipedia.py", line 2222, in put newtext = ccToolkit.change(newtext) File "I:\py\cosmetic_changes.py", line 157, in change text = self.standardizePageFooter(text) File "I:\py\cosmetic_changes.py", line 251, in standardizePageFooter categories = pywikibot.getCategoryLinks(text, site=self.site) File "I:\py\pywikibot\textlib.py", line 639, in getCategoryLinks import catlib File "I:\py\pywikibot\catlib.py", line 17, in <module> from pywikibot import Category ImportError: cannot import name Category
I:\py>
https://bugzilla.wikimedia.org/show_bug.cgi?id=59790
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |UNCONFIRMED CC| |info@gno.de Assignee|Pywikipedia-bugs@lists.wiki |info@gno.de |media.org | Ever confirmed|1 |0
--- Comment #1 from xqt info@gno.de --- You are running core scripts on compat branch. Your catlib is from core but the remaining scripts looks like compat. Please validate your framework. There shouldn't be a catlib.py in the pywikibot folder on compat.
pywikipedia-bugs@lists.wikimedia.org