tg-archive icon indicating copy to clipboard operation
tg-archive copied to clipboard

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

Open kenorb opened this issue 2 years ago • 0 comments

$ 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.

kenorb avatar Jan 12 '24 22:01 kenorb