Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

download tg files failed sometimes #109

@wx69wx

Description

@wx69wx

sometimes download tg file failed, the log below.
reboot vps can fix,but why?
please fix the bug , thanks a lot!

2022-10-12 22:26:41,307 - pyrogram.connection.connection - WARNING - timed out
2022-10-12 22:27:47,591 - pyrogram.session.session - WARNING - [5] Retrying "raw.functions.upload.GetFile" due to
2022-10-12 22:28:03,100 - pyrogram.client - ERROR -
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/pyrogram/client.py", line 952, in get_file
r = await session.send(
File "/usr/local/lib/python3.9/dist-packages/pyrogram/session/session.py", line 461, in send
return await self.send(data, retries - 1, timeout)
File "/usr/local/lib/python3.9/dist-packages/pyrogram/session/session.py", line 461, in send
return await self.send(data, retries - 1, timeout)
File "/usr/local/lib/python3.9/dist-packages/pyrogram/session/session.py", line 461, in send
return await self.send(data, retries - 1, timeout)
[Previous line repeated 2 more times]
File "/usr/local/lib/python3.9/dist-packages/pyrogram/session/session.py", line 454, in send
raise e from None
File "/usr/local/lib/python3.9/dist-packages/pyrogram/session/session.py", line 442, in send
return await self._send(data, timeout=timeout)
File "/usr/local/lib/python3.9/dist-packages/pyrogram/session/session.py", line 407, in _send
raise TimeoutError
TimeoutError
2022-10-12 22:28:03,278 - pyrogram.dispatcher - ERROR - expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/pyrogram/dispatcher.py", line 210, in handler_worker
await self.loop.run_in_executor(
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/root/bot/bot/plugins/download.py", line 67, in _telegram_file
sent_message.edit(Messages.DOWNLOADED_SUCCESSFULLY.format(os.path.basename(file_path), humanbytes(os.path.getsize(file_path))))
File "/usr/lib/python3.9/posixpath.py", line 142, in basename
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions