Is there a reason that you're trying to use LogEntryListGenerator instead
of the site's logevents method?
>>> import pywikibot
>>> site = pywikibot.Site()
>>> gen = site.logevents('delete')
>>> print(next(gen))
On Sun, Feb 5, 2023 at 3:31 PM Bináris wrote:
> I tried to list delete log
I tried to list delete log entries:
from pywikibot.data.api import LogEntryListGenerator
gen = LogEntryListGenerator('delete')
print(next(gen))
I get a wirning and an error:
WARNING: c:\Pywikibot\pywikibot\data\api\_generators.py:857: *RuntimeWarning:
LogEntryListGenerator invoked without a
Thank you! The reason is that I have not found any pattern how to do it,
and tried to find something in docs.
However,
https://doc.wikimedia.org/pywikibot/master/api_ref/logentries.html#module-logentries
does not list DeleteEntry, and the search lists only results in tests, not
the production
jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/883275 )
Change subject: [Bugfix] Copy snak IDs/hashes when using editEntity
..
[Bugfix] Copy snak IDs/hashes when using editEntity
jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/871019 )
Change subject: [Bugfix] Add timezone_aware to toTimestamp()
..
[Bugfix] Add timezone_aware to toTimestamp()
Bug: T325868
RPI2026F1 closed this task as "Resolved".
TASK DETAIL
https://phabricator.wikimedia.org/T325868
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: RPI2026F1
Cc: Aklapper, RPI2026F1, pywikibot-bugs-list, PotsdamLamb, Jyoo1011,
JohnsonLee01, SHEKH,
Maintenance_bot removed a project: Patch-For-Review.
TASK DETAIL
https://phabricator.wikimedia.org/T325868
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: RPI2026F1, Maintenance_bot
Cc: Aklapper, RPI2026F1, pywikibot-bugs-list, PotsdamLamb, Jyoo1011,
Maintenance_bot removed a project: Patch-For-Review.
TASK DETAIL
https://phabricator.wikimedia.org/T327607
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Maintenance_bot
Cc: Aklapper, RPI2026F1, pywikibot-bugs-list, PotsdamLamb, Jyoo1011,
RPI2026F1 closed subtask T325868: pywikibot.WbTime.toTimestamp discards
timezone information as Resolved.
TASK DETAIL
https://phabricator.wikimedia.org/T325864
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: RPI2026F1
Cc: Aklapper,
Nirvanchik added a comment.
So it crashes while getting new token:
ERROR: File "c:\work\wiki\bot\Python\git\core\pywikibot\site\_apisite.py",
line 409, in login
if login_manager.login(retry=True, autocreate=autocreate):
ERROR: File
matej_suchanek added a comment.
Yes, or `wikibase_edit_tests.py`, if you plan testing write actions.
TASK DETAIL
https://phabricator.wikimedia.org/T305302
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: matej_suchanek
Cc: Ayush_Anand3310,
Nirvanchik added a comment.
This is where pywikibot is making request.
Traceback (most recent call last):
File "c:\work\wiki\bot\Python\git\core\pwb.py", line 39, in
sys.exit(main())
File "c:\work\wiki\bot\Python\git\core\pwb.py", line 35, in main
Nirvanchik added a comment.
Wow. The problem I was writing about is handled already with using try-except.
# May occur if you are not logged in (no API read permissions).
except APIError:
pass
So I have another problem actually.
TASK DETAIL
MarcoAurelio created this task.
MarcoAurelio added projects: Pywikibot, Pywikibot-Scripts.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
For {src PWBC:scripts/clean_sandbox.py} would it be possible to add a
`-oldid:N` flag where `N` would be the
RPI2026F1 closed this task as "Resolved".
RPI2026F1 claimed this task.
TASK DETAIL
https://phabricator.wikimedia.org/T327607
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: RPI2026F1
Cc: Aklapper, RPI2026F1, pywikibot-bugs-list, PotsdamLamb,
Nirvanchik added a comment.
In my case it tries to login without token (may be it relies that cookies may
be available?) and fails.
ERRORReceived incorrect login token. Forcing re-login.
After that, it is making again query siteinfo
URI:
Nirvanchik added a comment.
I found a hotfix that helped me to log in:
class TokenWallet(Container):
def __getitem__(self, key: str) -> str:
"""Get token value for the given key."""
if self.site.user() is None and key != 'login':
gerritbot added a comment.
Change 871019 **merged** by jenkins-bot:
[pywikibot/core@master] [Bugfix] Add timezone_aware to toTimestamp()
https://gerrit.wikimedia.org/r/871019
TASK DETAIL
https://phabricator.wikimedia.org/T325868
EMAIL PREFERENCES
gerritbot added a comment.
Change 883275 **merged** by jenkins-bot:
[pywikibot/core@master] [Bugfix] Copy snak IDs/hashes when using editEntity
https://gerrit.wikimedia.org/r/883275
TASK DETAIL
https://phabricator.wikimedia.org/T327607
EMAIL PREFERENCES
19 matches
Mail list logo