Last modified: 2014-01-10 08:50:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61790, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59790 - cosmetic changes cannot import name Category
cosmetic changes cannot import name Category
Status: RESOLVED INVALID
Product: Pywikibot
Classification: Unclassified
Cosmetic changes (Other open bugs)
compat-(1.0)
All All
: Unprioritized normal
: ---
Assigned To: xqt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-07 20:31 UTC by JAn Dudík
Modified: 2014-01-10 08:50 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description JAn Dudík 2014-01-07 20:31:59 UTC
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>
Comment 1 xqt 2014-01-08 06:53:03 UTC
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.
Comment 2 JAn Dudík 2014-01-08 08:20:20 UTC
It's possible, because words *Co*re and *Co*mpat are more similar than Trunk and Rewrite and when migrating on new computer, I mixed these frameworks together. Thank for hint, I'll check it

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links