Nodita created this task.
Nodita added projects: Pywikibot-replace.py, Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
I´m getting the followed exception trying to use a text replace function of
replace.py
ERROR: KeyError: 'restrictions'
Traceback (most recent call last):
File ".\pwb.py", line 378, in <module>
if not main():
File ".\pwb.py", line 370, in main
run_python_file(filename,
File ".\pwb.py", line 105, in run_python_file
exec(compile(source, filename, 'exec', dont_inherit=True),
File ".\scripts\replace.py", line 1170, in <module>
main()
File ".\scripts\replace.py", line 1162, in main
bot.run()
File "C:\core\pywikibot\bot.py", line 1405, in run
self.treat(page)
File ".\scripts\replace.py", line 727, in treat
if not page.has_permission():
File "C:\core\pywikibot\page\__init__.py", line 1159, in has_permission
return self.site.page_can_be_edited(self, action)
File "C:\core\pywikibot\site\__init__.py", line 3177, in
page_can_be_edited
if action not in self.siteinfo['restrictions']['types']:
File "C:\core\pywikibot\site\__init__.py", line 1640, in __getitem__
return self.get(key, False) # caches and doesn't force it
File "C:\core\pywikibot\site\__init__.py", line 1688, in get
raise KeyError(key)
KeyError: 'restrictions'
CRITICAL: Exiting due to uncaught exception <class 'KeyError'>
The line I´m running is like this:
python.exe .\pwb.py replace -page:"Pagename" "Woord" "Word"
The bot is logged into a FANDOM (Wikia) site running on MediaWiki 1.19.24.
The bot works without any problem for delete.py.
TASK DETAIL
https://phabricator.wikimedia.org/T254623
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Nodita
Cc: Aklapper, pywikibot-bugs-list, Nodita, JohnsonLee01, SHEKH, Dijkstra,
Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa,
Altostratus, binbot, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs