See https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=1224183973 where a full traceback is given under the heading "ChristieBot unable to edit Talk:Israeli invasion of the Gaza Strip (2023–present)".
The bot has "edit protected" set to yes, and has the extended-confirmed user right, but when attempting to modify the text of the semi-protected talk page it raises UnsupportedPageError: Page [[en:Special:Log]] is not supported due to namespace restriction..
>>> import pywikibot
>>> site = pywikibot.Site('wikipedia:en')
>>> page = pywikibot.Page(site, 'Talk:Israeli invasion of the Gaza Strip (2023–present)')
>>> page.botMayEdit()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jjmc89/wrk/pwb/pywikibot/page/_basepage.py", line 1158, in botMayEdit
self._bot_may_edit = self._check_bot_may_edit()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jjmc89/wrk/pwb/pywikibot/page/_basepage.py", line 1175, in _check_bot_may_edit
templates = self.templatesWithParams()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jjmc89/wrk/pwb/pywikibot/page/_page.py", line 78, in templatesWithParams
titles = {t.title() for t in self.templates()}
^^^^^^^^^^^^^^^^
File "/home/jjmc89/wrk/pwb/pywikibot/page/_basepage.py", line 1624, in templates
self._templates = set(self.itertemplates(content=content))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen _collections_abc>", line 330, in __next__
File "/home/jjmc89/wrk/pwb/pywikibot/tools/collections.py", line 279, in send
return next(self._started_gen)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jjmc89/wrk/pwb/pywikibot/data/api/_generators.py", line 625, in generator
yield from self._extract_results(resultdata)
File "/home/jjmc89/wrk/pwb/pywikibot/data/api/_generators.py", line 567, in _extract_results
result = self.result(item)
^^^^^^^^^^^^^^^^^
File "/home/jjmc89/wrk/pwb/pywikibot/data/api/_generators.py", line 736, in result
update_page(p, pagedata, self.props)
File "/home/jjmc89/wrk/pwb/pywikibot/data/api/_generators.py", line 983, in update_page
_update_pageid(page, pagedict)
File "/home/jjmc89/wrk/pwb/pywikibot/data/api/_generators.py", line 882, in _update_pageid
raise UnsupportedPageError(page)
pywikibot.exceptions.UnsupportedPageError: Page [[en:Special:Log]] is not supported due to namespace restriction.