knadh / tg-archive

A tool for exporting Telegram group chats into static websites like mailing list archives.
MIT License
903 stars 139 forks source link

AttributeError: 'WebPagePending' object has no attribute 'url' #124

Open kenorb opened 10 months ago

kenorb commented 10 months ago
$ tg-archive --sync
...
2024-01-12 23:44:03,791: fetched 166800 messages
Traceback (most recent call last):
  File ".local/bin/tg-archive", line 8, in <module>
    sys.exit(main())
  File ".local/lib/python3.10/site-packages/tgarchive/__init__.py", line 142, in main
    s.sync(args.id, args.from_id)
  File ".local/lib/python3.10/site-packages/tgarchive/sync.py", line 56, in sync
    for m in self._get_messages(group_id,
  File ".local/lib/python3.10/site-packages/tgarchive/sync.py", line 168, in _get_messages
    med = self._get_media(m)
  File ".local/lib/python3.10/site-packages/tgarchive/sync.py", line 278, in _get_media
    url=msg.media.webpage.url,
AttributeError: 'WebPagePending' object has no attribute 'url'
$ tg-archive --version
v1.1.3

This happens at random, running it again works fine.