knadh / tg-archive

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

AttributeError: 'ChannelForbidden' object has no attribute 'scam' #84

Closed Nakilon closed 1 year ago

Nakilon commented 1 year ago
2022-10-22 04:10:57,184: fetching from last message id=96502 (2022-09-23 00:00:00)
Traceback (most recent call last):
  File "/usr/local/bin/tg-archive", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/tgarchive/__init__.py", line 130, in main
    s.sync(args.id, args.from_id)
  File "/usr/local/lib/python3.9/site-packages/tgarchive/sync.py", line 56, in sync
    for m in self._get_messages(group_id,
  File "/usr/local/lib/python3.9/site-packages/tgarchive/sync.py", line 165, in _get_messages
    user=self._get_user(m.sender),
  File "/usr/local/lib/python3.9/site-packages/tgarchive/sync.py", line 192, in _get_user
    if u.scam:
AttributeError: 'ChannelForbidden' object has no attribute 'scam'
Nakilon commented 1 year ago

Oh I see the https://github.com/knadh/tg-archive/issues/71

How do I use the master branch? I'm not a pythonist. Installed via pip3 In Ruby it would be just creating a Gemfile with the line gem "tg-archive", github: "knadh/tg-archive"

For now I did the hot edit on the installed application code.

knadh commented 1 year ago

This fix was released a while ago. You can just upgrade your tg-archive installation to v1.0.0.