Last modified: 2014-05-11 17:31:33 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 T67135, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65135 - Fix imageuncat.py -yesterday
Fix imageuncat.py -yesterday
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks: hackathon2014
  Show dependency treegraph
 
Reported: 2014-05-10 14:00 UTC by Maarten Dammers
Modified: 2014-05-11 17:31 UTC (History)
1 user (show)

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


Attachments

Description Maarten Dammers 2014-05-10 14:00:50 UTC
tools.catbot@tools-login:~$ python /shared/pywikipedia/core/scripts/version.py
Pywikibot: [https] r-p-pywikibot-core.git (05e55f3, g3080, 2014/05/10, 07:16:30, OUTDATED)
Release version: 2.0b1
Python: 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3]
unicode test: ok
tools.catbot@tools-login:~$ python /shared/pywikipedia/core/scripts/imageuncat.py -yesterday
Traceback (most recent call last):
  File "/shared/pywikipedia/core/scripts/imageuncat.py", line 21, in <module>
    import query
ImportError: No module named query
<type 'exceptions.ImportError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
tools.catbot@tools-login:~$

Query doesn't work in core and I don't want to add it. Probably best to modify the function to use logevents() in site.

def logevents(self, logtype=None, user=None, page=None,
                  start=None, end=None, reverse=False, step=None, total=None):
        """Iterate all log entries.

        @param logtype: only iterate entries of this type (see wiki
            documentation for available types, which will include "block",
            "protect", "rights", "delete", "upload", "move", "import",
            "patrol", "merge")
        @param user: only iterate entries that match this user name
        @param page: only iterate entries affecting this page
        @param start: only iterate entries from and after this Timestamp
        @param end: only iterate entries up to and through this Timestamp
        @param reverse: if True, iterate oldest entries first (default: newest)

        """
Comment 1 Merlijn van Deen (test) 2014-05-10 14:05:57 UTC
As a workaround, try:

PYWIKIBOT2_DIR=~/.pywikibot/ python /shared/pywikipedia/core/pwb.py imageuncat
Comment 2 Gerrit Notification Bot 2014-05-10 21:26:25 UTC
Change 132722 had a related patch set uploaded by Mpaa:
Bug 65135: Fix the yesterday generator

https://gerrit.wikimedia.org/r/132722
Comment 3 Gerrit Notification Bot 2014-05-11 13:38:18 UTC
Change 132722 merged by jenkins-bot:
Bug 65135: Fix the yesterday generator

https://gerrit.wikimedia.org/r/132722

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


Navigation
Links