For the last 4 days, my Stack Exchange view count graphing script has been breaking with StackAPI claiming that:
requests.exceptions.InvalidURL: Failed to parse: https://api.stackexchange.com/2.2/sites/
It had been working fine for the last year without any modifications, so I don't think this is a coding mistake on my end. Did Stack Exchange update something in its API output?
You can reproduce the error with this Python code:
from stackapi import StackAPI
StackAPI('worldbuilding')
Apologies if this should be a Stack Overflow question. Let me know.
https://api.stackexchange.com/2.2/sites/
works fine.from stackapi import StackAPI; StackAPI('meta')
"twitter_account"
field for each siterequests
you'd previously been using or the then current version (which would have already been the fixed version; 2.31.0 was released 2023-05-22, so well outside that 4 days).