JAnD added a comment.
I have this problem often with almost every script working on wikidata,
icluding harvest_temlate or claimit.
C:\PWB>python pwb.py claimit -file:aa.txt -family:wikidata -lang:wikidata
P10254 Q123995543
WARNING: ClaimRobot.__init__ set the Bot.site property; this is only needed
when the Bot accesses many sites.
>>> Q1494437 <<<
Adding P10254 --> [[wikidata:Q123995543]]
Exception in thread Put-Thread:
Traceback (most recent call last):
File "C:\Program Files\Python314\Lib\threading.py", line 1082, in
_bootstrap_inner
self._context.run(self.run)
~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "C:\Program Files\Python314\Lib\threading.py", line 1024, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\PWB\pywikibot\tools\_deprecate.py", line 598, in wrapper
return func(*args, **kwargs)
File "C:\PWB\pywikibot\__init__.py", line 433, in async_manager
request(*args, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^
File "C:\PWB\pywikibot\page\_decorators.py", line 32, in handle
func(self, *args, **kwargs)
~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "C:\PWB\pywikibot\page\_wikibase.py", line 902, in addClaim
self.repo.addClaim(self, claim, bot=bot, **kwargs)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\PWB\pywikibot\site\_decorators.py", line 93, in callee
return fn(self, *args, **kwargs)
File "C:\PWB\pywikibot\site\_datasite.py", line 379, in addClaim
'token': self.tokens['csrf'],
~~~~~~~~~~~^^^^^^^^
File "C:\PWB\pywikibot\site\_tokenwallet.py", line 53, in __getitem__
raise KeyError(
f'Invalid token {key!r} for user {self._currentuser!r} on '
f'{self.site} wiki.') from None
KeyError: "Invalid token 'csrf' for user 'JAnDbot' on wikidata:wikidata
wiki."
ERROR: Logged in as '109.164.xx.xx' instead of 'JAnDbot'. Forcing re-login.
>>> Q14126276 <<<
Adding P10254 --> [[wikidata:Q123995543]]
but no edit is saved.
using pywikibot 11.2.0
TASK DETAIL
https://phabricator.wikimedia.org/T261050
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]