Closed swiezaczek closed 1 year ago
and new error that started appearing: TGTG: API run at Sat Oct 1 22:05:05 2022 successful. Foodsi total items: 375 {"ok": false, "errorcode": 400, "description": "Bad Request: wrong file identifier/HTTP URL specified"} https://fodsiror-production-attachments.s3.amazonaws.com/uploads/package/image/1366/1aa8753086.jpeg 🍽 There are 2 new goodie bags at [Cukiernia A. Cieślikowski Blue City](https://www.cukierniacieslik owski.pl/) 🥐🥪🍰 W Cukierni A. Cieślikowski znajdziecie ciasteczka, ciasta, szarlotki, serniki, pulchne pączki i wiele innych smakołyków._ 💰 15.99PLN/50.0PLN ⏰ 17:00-17:50 ℹ️ foodsi.pl Traceback (most recent call last): File "C:\Users\ASUS ROG\Desktop\am_bot-mainkopia\watch_script.py", line 319, in foodsi item['msg_id'] = tg['result']['message_id'] KeyError: 'result'
{"ok": false, "errorcode": 400, "description": "Bad Request: wrong file identifier/HTTP URL specified"} https://fodsiror-production-attachments.s3.amazonaws.com/uploads/package/image/285/71aa88e001.jpeg 🍽 There are 1 new goodie bags at VegeSushi Okrzei 🍣🥟🍜 VegeSushi to kuchnia powstała z miłości do sushi, natury, świata. Codziennie z najświeższych składników przygotowują wegetariańskie oraz wegańskie sushi, które cieszy podniebienia najbardziej wybrednych. W tej paczce uratujesz set sushi Bento Vegan i sałatkę original kimchi._ 💰 44.49PLN/91.0PLN ⏰ 17:00-20:00 ℹ️ foodsi.pl Traceback (most recent call last): File "C:\Users\ASUS ROG\Desktop\am_bot-mainkopia\watch_script.py", line 319, in foodsi item['msg_id'] = tg['result']['message_id'] KeyError: 'result'
and new error that started appearing
It's due to telegram API file size limit of 5MB.
(most recent call last): File "C:\Users\ASUS ROG\Desktop\am_bot-mainkopia\watch_script.py", line 335, in foodsi tg = telegram_bot_delete_message([stock['msg_id'] for stock in foodsi_in_stock if stock['id'] == item['id']][0]) File "C:\Users\ASUS ROG\Desktop\am_bot-mainkopia\watch_script.py", line 335, in
tg = telegram_bot_delete_message([stock['msg_id'] for stock in foodsi_in_stock if stock['id'] == item['id']][0])
KeyError: 'msg_id'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\ASUS ROG\Desktop\am_bot-mainkopia\watch_script.py", line 368, in refresh foodsi() File "C:\Users\ASUS ROG\Desktop\am_bot-mainkopia\watch_script.py", line 338, in foodsi print(json.dumps(tg)) UnboundLocalError: local variable 'tg' referenced before assignment