DigitalBotz / Digital-Rename-Bot

This is a PowerFull Telegram File Rename and thumbnail & caption Changer Bot with High Speed
Apache License 2.0
36 stars 69 forks source link

pyrogram.errors.exceptions.bad_request_400.FileReferenceExpired: Telegram says: [400 FILE_REFERENCE_EXPIRED] - The file id contains an expired file reference, you must obtain a valid one by fetching the message from the origin context (caused by "upload.GetFile") #1

Open PalashMudi opened 9 months ago

PalashMudi commented 9 months ago

Starting process with command python3 bot.py 2023-10-09T14:50:34.083941+00:00 heroku[worker.1]: State changed from starting to up 2023-10-09T14:51:11.321043+00:00 app[worker.1]: 2505600 2023-10-09T14:51:56.156294+00:00 app[worker.1]: Telegram says: [400 FILE_REFERENCE_EXPIRED] - The file id contains an expired file reference, you must obtain a valid one by fetching the message from the origin context (caused by "upload.GetFile") 2023-10-09T14:51:56.156311+00:00 app[worker.1]: Traceback (most recent call last): 2023-10-09T14:51:56.156312+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/pyrogram/client.py", line 891, in get_file 2023-10-09T14:51:56.156313+00:00 app[worker.1]: r = await session.invoke( 2023-10-09T14:51:56.156313+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/pyrogram/session/session.py", line 389, in invoke 2023-10-09T14:51:56.156313+00:00 app[worker.1]: return await self.send(query, timeout=timeout) 2023-10-09T14:51:56.156314+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/pyrogram/session/session.py", line 357, in send 2023-10-09T14:51:56.156314+00:00 app[worker.1]: RPCError.raise_it(result, type(data)) 2023-10-09T14:51:56.156314+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/pyrogram/errors/rpc_error.py", line 91, in raise_it 2023-10-09T14:51:56.156315+00:00 app[worker.1]: raise getattr( 2023-10-09T14:51:56.156315+00:00 app[worker.1]: pyrogram.errors.exceptions.bad_request_400.FileReferenceExpired: Telegram says: [400 FILE_REFERENCE_EXPIRED] - The file id contains an expired file reference, you must obtain a valid one by fetching the message from the origin context (caused by "upload.GetFile") 2023-10-09T14:51:56.187116+00:00 app[worker.1]: cannot identify image file '/app/downloads/photo_2023-10-09_14-51-53_7287971576123752480.jpg' 2023-10-09T14:51:56.187118+00:00 app[worker.1]: Traceback (most recent call last): 2023-10-09T14:51:56.187118+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/pyrogram/dispatcher.py", line 240, in handler_worker 2023-10-09T14:51:56.187119+00:00 app[worker.1]: await handler.callback(self.client, *args) 2023-10-09T14:51:56.187119+00:00 app[worker.1]: File "/app/plugins/cb_data.py", line 194, in vid 2023-10-09T14:51:56.187119+00:00 app[worker.1]: Image.open(ph_path).convert("RGB").save(ph_path) 2023-10-09T14:51:56.187120+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/PIL/Image.py", line 3280, in open 2023-10-09T14:51:56.187120+00:00 app[worker.1]: raise UnidentifiedImageError(msg) 2023-10-09T14:51:56.187136+00:00 app[worker.1]: PIL.UnidentifiedImageError: cannot identify image file '/app/downloads/photo_2023-10-09_14-51-53_7287971576123752480.jpg'

DigitalBotz commented 2 months ago

Fixed & Update To V3 ❣️