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-b...@lists.wikimedia.org
          Reporter: jan.du...@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>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to