# Mantidfly Backend Error Log - Get <Response [429]> From Mattermost api ``` 2022-10-21 11:32:50.668 | INFO | utils.exec_request:exec_api:55 - Too many requests, sleep 5... 2022-10-21 11:32:55.673 | ERROR | __main__:<module>:23 - Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): > File "function_main.py", line 21, in <module> globals()[sys.argv[1]]() │ └ ['function_main.py', 'db_sync', '&&', 'sleep', '10'] └ <module 'sys' (built-in)> File "/app/backend/functions/db_sync.py", line 445, in db_sync sync_channel_name() └ <function sync_channel_name at 0x7f3ae93f6320> File "/app/backend/functions/db_sync.py", line 243, in sync_channel_name ch_serv["rename_by_admin"] = ch_serv.apply(lambda c: _detect_rename_by_admin(mm, c["notify_token"]), axis=1) │ │ │ │ └ <utils.mattermost.MattermostHandler object at 0x7f3ae85d3f90> │ │ │ └ <function _detect_rename_by_admin at 0x7f3ae93f63b0> │ │ └ <function DataFrame.apply at 0x7f3ae9e54dd0> │ └ channel_id ... channel_url_foot │ 0 81 ... string-81 │ 1 71 ... ... └ channel_id ... channel_url_foot 0 81 ... string-81 1 71 ... ... File "/usr/local/lib/python3.7/site-packages/pandas/core/frame.py", line 7768, in apply return op.get_result() │ └ <function FrameApply.get_result at 0x7f3ae8556950> └ <pandas.core.apply.FrameColumnApply object at 0x7f3ae85b66d0> File "/usr/local/lib/python3.7/site-packages/pandas/core/apply.py", line 185, in get_result return self.apply_standard() │ └ <function FrameApply.apply_standard at 0x7f3ae8556b90> └ <pandas.core.apply.FrameColumnApply object at 0x7f3ae85b66d0> File "/usr/local/lib/python3.7/site-packages/pandas/core/apply.py", line 276, in apply_standard results, res_index = self.apply_series_generator() │ └ <function FrameApply.apply_series_generator at 0x7f3ae8556c20> └ <pandas.core.apply.FrameColumnApply object at 0x7f3ae85b66d0> File "/usr/local/lib/python3.7/site-packages/pandas/core/apply.py", line 290, in apply_series_generator results[i] = self.f(v) │ │ │ │ └ channel_id 165 │ │ │ │ channel_name [DAAI] IE Dashboard │ │ │ │ notify_token n3cqathbspn... │ │ │ └ <function sync_channel_name.<locals>.<lambda> at 0x7f3b6bededd0> │ │ └ <pandas.core.apply.FrameColumnApply object at 0x7f3ae85b66d0> │ └ 47 └ {0: False, 1: False, 2: False, 3: False, 4: False, 5: False, 6: False, 7: False, 8: False, 9: False, 10: False, 11: False, 12... File "/app/backend/functions/db_sync.py", line 243, in <lambda> ch_serv["rename_by_admin"] = ch_serv.apply(lambda c: _detect_rename_by_admin(mm, c["notify_token"]), axis=1) │ │ │ └ channel_id 165 │ │ │ channel_name [DAAI] IE Dashboard │ │ │ notify_token n3cqathbspn... │ │ └ <utils.mattermost.MattermostHandler object at 0x7f3ae85d3f90> │ └ <function _detect_rename_by_admin at 0x7f3ae93f63b0> └ channel_id 165 channel_name [DAAI] IE Dashboard notify_token n3cqathbspn... File "/app/backend/functions/db_sync.py", line 268, in _detect_rename_by_admin status_code, post_id = mm.get_latest_post_id_for_channel(channel_token) │ │ └ 'n3cqathbspnh9g4uzxhe5mz5bh' │ └ <function MattermostHandler.get_latest_post_id_for_channel at 0x7f3b6a5e2a70> └ <utils.mattermost.MattermostHandler object at 0x7f3ae85d3f90> File "/app/backend/utils/mattermost.py", line 546, in get_latest_post_id_for_channel result = resp.json() │ └ <function Response.json at 0x7f3b6ba11d40> └ <Response [429]> File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 900, in json return complexjson.loads(self.text, **kwargs) │ │ │ │ └ {} │ │ │ └ <property object at 0x7f3b6bb87e30> │ │ └ <Response [429]> │ └ <function loads at 0x7f3b6bcb23b0> └ <module 'json' from '/usr/local/lib/python3.7/json/__init__.py'> File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) │ │ └ 'limit exceeded\n' │ └ <function JSONDecoder.decode at 0x7f3b6bcab560> └ <json.decoder.JSONDecoder object at 0x7f3b6bca8610> File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) │ │ │ │ └ 'limit exceeded\n' │ │ │ └ <built-in method match of re.Pattern object at 0x7f3b6bce1c30> │ │ └ 'limit exceeded\n' │ └ <function JSONDecoder.raw_decode at 0x7f3b6bcab5f0> └ <json.decoder.JSONDecoder object at 0x7f3b6bca8610> File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None │ └ 'limit exceeded\n' └ <class 'json.decoder.JSONDecodeError'> json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) ```