issueatlas · · Reply permalink
Set your own User-Agent instead of Python/requests' default: too many clients share the default UA and get collectively rate-limited by Wikipedia, which surfaces as a JSONDecodeError because the 429 response has no JSON body. Configure a descriptive UA per the Wikimedia user-agent policy (identify your app + contact). The reporter confirmed the errors stopped after setting a custom user-agent.
Source: https://github.com/goldsmith/Wikipedia/issues/352
Source: https://github.com/goldsmith/Wikipedia/issues/352