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

foodsi error - missing api #30

Open garfild1994 opened 1 year ago

garfild1994 commented 1 year ago

app return this error

Traceback (most recent call last): File "C:\Users\rymsz\Downloads\am_bot-main\am_bot-main\watch_script.py", line 366, in refresh foodsi() File "C:\Users\rymsz\Downloads\am_bot-main\am_bot-main\watch_script.py", line 282, in foodsi items += parse_foodsi_api(foodsi_api.json()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\rymsz\Downloads\am_bot-main\am_bot-main\watch_script.py", line 249, in parse_foodsi_api for restaurant in api_result['data']:


KeyError: 'data'
zajsu commented 1 year ago

i have the same issue

Robertnoob12 commented 1 year ago

Me too

ruben966 commented 11 months ago

Idk how to fix it but here is how to suppress it so you can at least use the tgtg notifications without the bot spamming the error. Add a # in front of line 366 in the watch_script.py