AbirHasan2005 / VideoCompress

Telegram Video Compressor Bot By @AbirHasan2005
GNU General Public License v3.0
130 stars 532 forks source link

Cancel Command Shows Error Sometimes #2

Closed AbirHasan2005 closed 3 years ago

AbirHasan2005 commented 3 years ago

Cancel Command Shows Error Sometimes. But Last Process Really Cancels. Don't Know Why Error Coming. It's Like:

2020-12-24T08:00:35.943270+00:00 app[worker.1]: 24-Dec-20 13:30:35 - asyncio - DEBUG - Using selector: EpollSelector
2020-12-24T08:00:48.209099+00:00 app[worker.1]: 24-Dec-20 13:30:48 - bot.plugins.incoming_message_fn - INFO - /app/downloads/407274643.FFMpegRoBot.mkv
2020-12-24T08:00:58.182227+00:00 app[worker.1]: 24-Dec-20 13:30:58 - bot.plugins.incoming_message_fn - INFO - /app/downloads/407274643.FFMpegRoBot.mkv
2020-12-24T08:00:59.100707+00:00 app[worker.1]: 24-Dec-20 13:30:59 - bot.helper_funcs.ffmpeg - INFO - ffmpeg_process: 30
2020-12-24T08:02:50.390026+00:00 app[worker.1]: 24-Dec-20 13:32:50 - bot.plugins.incoming_message_fn - INFO - /app/downloads/715779594.FFMpegRoBot.mkv
2020-12-24T08:03:27.968345+00:00 app[worker.1]: 24-Dec-20 13:33:27 - bot.plugins.call_back_button_handler - INFO - 715779594
2020-12-24T08:03:28.690803+00:00 app[worker.1]: 24-Dec-20 13:33:28 - pyrogram.dispatcher - ERROR - [Errno 2] No such file or directory: '/app/downloads/progress.txt'
2020-12-24T08:03:28.690833+00:00 app[worker.1]: Traceback (most recent call last):
2020-12-24T08:03:28.690833+00:00 app[worker.1]:   File "/usr/local/lib/python3.8/dist-packages/pyrogram/dispatcher.py", line 208, in handler_worker
2020-12-24T08:03:28.690834+00:00 app[worker.1]:     await handler.callback(self.client, *args)
2020-12-24T08:03:28.690834+00:00 app[worker.1]:   File "/app/bot/plugins/incoming_message_fn.py", line 205, in incoming_compress_message_f
2020-12-24T08:03:28.690835+00:00 app[worker.1]:     o = await convert_video(
2020-12-24T08:03:28.690836+00:00 app[worker.1]:   File "/app/bot/helper_funcs/ffmpeg.py", line 95, in convert_video
2020-12-24T08:03:28.690837+00:00 app[worker.1]:     with open("/app/downloads/progress.txt",'r+') as file:
2020-12-24T08:03:28.690837+00:00 app[worker.1]: FileNotFoundError: [Errno 2] No such file or directory: '/app/downloads/progress.txt'

If you can fix this than please contact us in Telegram Group.

AbirHasan2005 commented 3 years ago

Fixed 🎉