Solved: I emptied the apicache-py3 directory, and it works. It always helps if you write about a problem publicly, the solution comes after. :-)

Bináris <wikiposta@gmail.com> ezt írta (időpont: 2023. márc. 27., H, 20:52):
Today in wikipedia:hu namespaces 118, 119 were set. See T33308.
https://phabricator.wikimedia.org/T333083

Now I have problems with the new namespaces.

Message: KeyError: '118 is not a known namespace. Maybe you should clear the api cache.'
Source: Pywikibot\pywikibot\site\_namespace.py

>>> list(site.namespaces())
[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 90, 91, 92, 93, 100, 101, 710, 711, 828, 829, 2300, 2301, 2302, 2303]

How to clear the API cache? Should Pywikibot automatically recognaize the new namespaces or shall I alter the code somewhere?

--
Bináris


--
Bináris