PCO refresh warning: Traceback (most recent call last):
File "/opt/church-webhook/HVACScripts/pco-hvac-sync.py", line 76, in pco_get
with urllib.request.urlopen(req, timeout=30) as res:
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen
return opener.open(url, data, timeout)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/urllib/request.py", line 495, in open
response = meth(req, response)
File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response
response = self.parent.error(
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.13/urllib/request.py", line 533, in error
return self._call_chain(*args)
~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 429: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/church-webhook/HVACScripts/pco-hvac-sync.py", line 703, in <module>
main()
~~~~^^
File "/opt/church-webhook/HVACScripts/pco-hvac-sync.py", line 649, in main
plan = build_plan()
File "/opt/church-webhook/HVACScripts/pco-hvac-sync.py", line 183, in build_plan
instances = get_upcoming_instances()
File "/opt/church-webhook/HVACScripts/pco-hvac-sync.py", line 125, in get_upcoming_instances
instances = pco_all(f"{API}/event_instances?{query}")
File "/opt/church-webhook/HVACScripts/pco-hvac-sync.py", line 88, in pco_all
page = pco_get(url)
File "/opt/church-webhook/HVACScripts/pco-hvac-sync.py", line 80, in pco_get
raise RuntimeError(f"PCO request failed {e.code}: {url}\n{body}")
RuntimeError: PCO request failed 429: https://api.planningcenteronline.com/calendar/v2/event_instances?filter=future&offset=1500&order=starts_at&per_page=100
{"errors":[{"code":"429","title":"Too Many Requests","detail":"Rate limit exceeded: 103 of 100 requests per 20 seconds"}]}