Skip to content

[BUG] Using telegram bot local server can't send / receive Files #133

Open
@kettly1260

Description

Describe the bug
Using telegram bot local server can't send / receive Files

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
When I change the telegram api to the local server,the bot can received the text,but when I sent the pictures or
any files, the bot prompts that
"Unknown error has occurred while trying to process this message. See log for details.

InvalidToken() " 。

When I received files, nothing prompted and couldn't receive them

Screenshots
If applicable, add screenshots to help explain your problem.

Version information (please complete the following information):

  • OS: [e.g. iOS]
  • Detailed Python, EFB and module versions: (you can obtain this by running ehforwarderbot --version)
EH Forwarder Bot
Version: 2.1.1
Python version:
3.8

Master channel:
   EFB Telegram Master Channel 2.3.1

Slave channel:
   WeChat Slave (blueset.wechat, 2.0.6.dev10)

Middleware:
- MP InstantView Middleware (catbaron.mp_instantview, 0.3.1)
- Search Message Middleware (catbaron.search_msg, 0.1.0)

Additional context
elete_chat_photo': False, 'channel_chat_created': False, 'caption_entities': [], 'from': {'id': xxxxx, 'is_bot': False, 'first_name': 'xxxx', 'language_code': 'zh-hans'}}, 'update_id': xxxxx}.
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.8/site-packages/efb_telegram_master/master_message.py", line 103, in message_worker
self.msg(update, context)
File "/home/ubuntu/.local/lib/python3.8/site-packages/efb_telegram_master/master_message.py", line 207, in msg
return self.process_telegram_message(update, context, destination, quote=quote, edited=edited)
File "/home/ubuntu/.local/lib/python3.8/site-packages/efb_telegram_master/master_message.py", line 426, in process_telegram_message
if m.file:
File "/home/ubuntu/.local/lib/python3.8/site-packages/efb_telegram_master/message.py", line 130, in get_file
self._load_file()
File "/home/ubuntu/.local/lib/python3.8/site-packages/efb_telegram_master/message.py", line 77, in _load_file
file_meta.download(out=file)
File "/home/ubuntu/.local/lib/python3.8/site-packages/telegram/files/file.py", line 148, in download
buf = self.bot.request.retrieve(url)
File "/home/ubuntu/.local/lib/python3.8/site-packages/telegram/utils/request.py", line 385, in retrieve
return self._request_wrapper('GET', url, **urlopen_kwargs)
File "/home/ubuntu/.local/lib/python3.8/site-packages/telegram/utils/request.py", line 281, in _request_wrapper
raise InvalidToken()
telegram.error.InvalidToken: Invalid token

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions