kacpi2442 / am_bot

Using the toogoodtogo and foodsi APIs to notify me via a Telegram bot for open offers
39 stars 19 forks source link

Traceback Error after fetching data #23

Open Elias970 opened 1 year ago

Elias970 commented 1 year ago

after every fetched ToGoodToGo upload occurres an Error: "


Traceback (most recent call last):
  File "/home/elias/Documents/Projects/am_bot/watch_script.py", line 210, in toogoodtogo
    item['msg_id'] = tg['result']['message_id']
                     ~~^^^^^^^^^^
KeyError: 'result'

{"ok": false, "error_code": 404, "description": "Not Found"}

``` " 
logtie commented 4 months ago

same problem here.. Telegram chat received succes but with this chat every minute:

(most recent call last): File "C:\Python\am_bot-main\watch_script.py", line 365, in refresh toogoodtogo() File "C:\Python\am_bot-main\watch_script.py", line 173, in toogoodtogo api_response = tgtg_client.get_items( ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312\Lib\site-packages\tgtg__init__.py", line 243, in get_items self.login() File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312\Lib\site-packages\tgtg__init.py", line 152, in login self._refresh_token() File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312\Lib\site-packages\tgtg\init__.py", line 138, in _refresh_token raise TgtgAPIError(response.status_code, response.content) tgtg.exceptions.TgtgAPIError: (403, b'{"url":"https://geo.captcha-delivery.com/captcha/?initialCid=xxx"}')