-
Notifications
You must be signed in to change notification settings - Fork 320
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
[Bug]: after update #81 the program freezes half way #87
Comments
Use bot? |
no, only client |
like that? api_hash: your_api_hash
api_id: your_api_id
chat:
- chat_id: telegram_chat_id
last_read_message_id: 0
download_filter: message_date >= 2022-12-01 00:00:00 and message_date <= 2023-01-17 00:00:00 |
my config:
on another computer, media_downloader.py dated 2023-06-08, size 19653 bytes, did not update either py files or requirements.txt - everything works here. could it be that i updated your project incorrectly? |
still write the correct instructions, for those who see git for the first time.
and everything worked again without errors, on the branch 2516fe2 how to update to the latest version?????? |
This problem is caused by you trying to download a message that does not exist, I will fix this problem as soon as possible, if you want to avoid this problem, please empty your data.yaml |
cd telegram_media_downloader
git pull
pip3 install -r requirements.txt |
You can discuss with us in the telegram group https://t.me/TeegramMediaDownload If you like the project, please give the project a star. |
updated "git pull" to "master_fix_87_download_error"
and ids_to_retry entries appeared in data.yaml for both chats
perhaps these messages no longer exist? |
what means freezes? |
where in the log I marked "interrupted here Ctrl-C" - it just stands and does nothing, nothing appears in the log or on the screen |
You open the website to see if it is downloading localhost:5000 |
You mean it should exit normally after the download is over, right? |
yes |
Ok, I know the reason, because we will judge whether each channel has been downloaded, and this judgment is problematic now, I will submit it to a new branch together, are there any other problems? |
So far I haven't noticed any other problems. |
17041 or 84186 not exist? |
if you delete ids_to_retry, then the program sets it to N+1 for the chat in which no files were downloaded in the current run. |
Also, messages deleted in the chat also fall into ids_to_retry:
specially went to the chat and copied the links to the latest existing messages: the program also freezes on them. |
there is no way to roll back to the point 2516fe2 now?
that option suited me better than d0d576f
now either the program stops, or you have to overwrite data.yaml with a clean one every run |
I will fix it |
telegram_media_downloader version or commit
2.1.9 from 2023-06-18
What OS are you seeing the problem on?
Windows
Python Version
3.8.10
What happened?
A bug happened!
maybe today's update of WebView2 Runtime Edge influenced?
rolling back to 2.1.9 from 2023-05-16 did not help.
or is it that I run "pip3 install -r requirements.txt" after each download of py files?
2023-06-18 20:47:28.466 | INFO | utils.meta:print_meta:22 - Device: CPython 3.8.10 - Telegram Media Downloader 2.1.9
2023-06-18 20:47:28.467 | INFO | utils.meta:print_meta:23 - System: Windows 10 (EN)
2023-06-18 20:47:29.781 | SUCCESS | main:main:591 - Successfully started (Press Ctrl+C to stop)
2023-06-18 20:47:29.782 | INFO | main:download_chat_task:505 - Downloading files failed during last run...
2023-06-18 20:47:29.855 | ERROR | main:worker:489 - 'NoneType' object has no attribute 'id'
Traceback (most recent call last):
File "media_downloader.py", line 628, in
main()
└ <function main at 0x000002445F995AF0>
File "media_downloader.py", line 602, in main
_exec_loop()
└ <function _exec_loop at 0x000002445F995A60>
File "media_downloader.py", line 569, in _exec_loop
app.loop.run_until_complete(run_until_all_task_finish())
│ │ │ └ <function run_until_all_task_finish at 0x000002445F9959D0>
│ │ └ <function BaseEventLoop.run_until_complete at 0x000002445BDBAC10>
│ └
└ <module.app.Application object at 0x000002445F97B520>
File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 603, in run_until_complete
self.run_forever()
│ └ <function ProactorEventLoop.run_forever at 0x000002445BE8A430>
└
File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py", line 316, in run_forever
super().run_forever()
File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 570, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x000002445BDBF700>
└
File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 1859, in _run_once
handle._run()
│ └ <function Handle._run at 0x000002445BD2B310>
└ <Handle <TaskWakeupMethWrapper object at 0x000002445FC3DD60>()>
File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\events.py", line 81, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle <TaskWakeupMethWrapper object at 0x000002445FC3DD60>()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle <TaskWakeupMethWrapper object at 0x000002445FC3DD60>()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle <TaskWakeupMethWrapper object at 0x000002445FC3DD60>()>
File "media_downloader.py", line 271, in download_task
download_status, file_name = await download_media(
└ <function download_media at 0x000002445F995670>
File "K:\Exec\tangyoha-tmd\module\pyrogram_extension.py", line 329, in inner
status, file_name = await func(
└ <function download_media at 0x000002445F9955E0>
File "media_downloader.py", line 357, in download_media
message = await fetch_message(client, message)
│ │ └ pyrogram.types.Message(id=16999, empty=True)
│ └ <pyrogram.client.Client object at 0x000002445F9B3A60>
└ <function fetch_message at 0x000002445E395820>
File "K:\Exec\tangyoha-tmd\module\pyrogram_extension.py", line 492, in fetch_message
chat_id=message.chat.id,
│ └ None
└ pyrogram.types.Message(id=16999, empty=True)
AttributeError: 'NoneType' object has no attribute 'id'
2023-06-18 20:47:31.481 | SUCCESS | main:_check_download_finish:77 - Successfully downloaded - K:\Exec\tangyoha-tmd\document\83932 - Золушка для инквизитора.fb2
2023-06-18 20:47:31.485 | SUCCESS | main:_check_download_finish:77 - Successfully downloaded - K:\Exec\tangyoha-tmd\document\83933 - 03_Олигарх_из_будущего_Книга_3_Миллионы_рождают_власть.fb2
2023-06-18 20:47:50.291 | INFO | main:main:604 - KeyboardInterrupt
2023-06-18 20:47:50.381 | INFO | main:main:612 - Stopped!
2023-06-18 20:47:50.768 | INFO | main:main:614 - update config......
2023-06-18 20:47:50.772 | SUCCESS | main:main:618 - Updated last read message_id to config file,total download 2, total upload file 0
Expected Behavior
how to return the normal operation of the program?
Current Behavior
download stops, it is not clear how many messages have been processed and how many are left
Possible Solution
No response
Steps to Reproduce
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: