https://bugzilla.wikimedia.org/show_bug.cgi?id=64087
Bug ID: 64087 Summary: Invalid index to a set in categorx.py Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: major Priority: Unprioritized Component: category.py Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: info@gno.de Web browser: --- Mobile Platform: ---
Bug reported by pyfisch:
[michael@michaellaptop pywikibot-core]$ python2 scripts/category.py tidy Which category do you want to tidy up? Deutschland Retrieving 1 pages from wikipedia:de. ===================================================================Treating page Deutschland, currently in Kategorie:Deutschland{{Dieser Artikel|behandelt den deutschen Staat, im engeren Sinn die Bundesrepublik Deutschland; zu weiteren Bedeutungen siehe [[Deutschla ### More Text here
Dumping to category.dump.bz2, please wait... Traceback (most recent call last): File "scripts/category.py", line 1087, in <module> main() File "scripts/category.py", line 1061, in main bot.run() File "scripts/category.py", line 842, in run self.move_to_category(article, cat, cat) File "scripts/category.py", line 761, in move_to_category % (i, supercatlist[i].title())) TypeError: 'set' object does not support indexing<type 'exceptions.TypeError'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
This is what I get when I try to run category.py tidy as it is currently in Git. I do not see any advantages of of CategoryDB and I want to remove it in another commit. It only adds complexity to the code, is broken, sometimes you will have outdated data in the database, and even with a 2Mbit connection you can fetch thousands of articles from the internet every second. If there should be some kind of caching in Pywikibot this should be done in the core of the framework, not in independent scripts for special use cases.
https://bugzilla.wikimedia.org/show_bug.cgi?id=64087
--- Comment #1 from xqt info@gno.de --- Bug was introduced by https://www.mediawiki.org/wiki/Special:Code/pywikipedia/6428 where lists where replaced by sets.
https://bugzilla.wikimedia.org/show_bug.cgi?id=64087
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Normal CC| |pyfisch@googlemail.com Summary|Invalid index to a set in |Invalid index to a set in |categorx.py |category.py Severity|major |normal
https://bugzilla.wikimedia.org/show_bug.cgi?id=64087
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 127251 had a related patch set uploaded by Xqt: (bug 64087) fix for indexing set in category.py
https://gerrit.wikimedia.org/r/127251
https://bugzilla.wikimedia.org/show_bug.cgi?id=64087
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=64087
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 127251 merged by jenkins-bot: (bug 64087) fix for indexing set in category.py; code improvements
https://gerrit.wikimedia.org/r/127251
https://bugzilla.wikimedia.org/show_bug.cgi?id=64087
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
pywikipedia-bugs@lists.wikimedia.org