Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events handler error: 'NoneType' object has no attribute 'id' #55

Open
shahram7 opened this issue Oct 23, 2024 · 1 comment
Open

Events handler error: 'NoneType' object has no attribute 'id' #55

shahram7 opened this issue Oct 23, 2024 · 1 comment
Assignees

Comments

@shahram7
Copy link

Hello Luis,

I hope you're doing well. I have some trouble downloading some files. I get this error.
I've got the file from a Telegram Bot.

Events handler error:  'NoneType' object has no attribute 'id'

  File "/usr/src/telegram-download-daemon-ng/src/telegram_download_daemon_ng/__init__.py", line 132, in handler

    channel=channel_msg.chat.id,

I think you use the chat id to create a folder to put the downloaded file there, right?

Best Regards, Shahram

@Nyaran
Copy link
Owner

Nyaran commented Nov 11, 2024

Hi,

sorry for the late response, GitHub doesn't notify me about this issue

I think you use the chat id to create a folder to put the downloaded file there, right?

That id is used to identify the message, as the daemon needs to store id to be able to download from the downloads queue.

The folder creation only applies when the link is to a channel directly, creating a folder with the channel name, and all media in that channel being stored in that folder. On single messages or attachment, there is no folder creation involved.

Can you explain how did you get that error? A reproducible example would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants