Skip to content

type BinaryIO declaration missing #1573

@futex

Description

@futex

I got this error when i start errbot 6.1.9

10:49:26 INFO errbot.bootstrap Found Storage plugin: Shelf. 10:49:26 INFO errbot.bootstrap Found Backend plugin: Telegram 10:49:26 DEBUG errbot.storage Opening storage 'repomgr' 10:49:26 DEBUG errbot.storage.shelf Open shelf storage /bot/errbot-ve/data/repomgr.db 10:49:26 ERROR errbot.bootstrap Unable to load or configure the backend. Traceback (most recent call last): File "/bot//python3.8/site-packages/errbot/bootstrap.py", line 181, in setup_bot bot = backendpm.load_plugin() File "/bot//python3.8/site-packages/errbot/backend_plugin_manager.py", line 62, in load_plugin plugin_classes = self.plugin_info.load_plugin_classes( File "/bot//python3.8/site-packages/errbot/plugin_info.py", line 100, in load_plugin_classes spec.loader.exec_module(modu1e) File "<frozen importlib._bootstrap_external>", line 848, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/bot//python3.8/site-packages/errbot/backends/telegram_messenger.py", line 189, in <module> class TelegramBackend(ErrBot): File "/bot//python3.8/site-packages/errbot/backends/telegram_messenger.py", line 418, in TelegramBackend fsource: Union[str, dict, BinaryIO], NameError: name 'BinaryIO' is not define

In the file errbot/backends/telegram_messenger.py it seem a declaration is missing
I have replace the line

from typing import Any, Optional, Union
by
from typing import Any, Optional, Union, BinaryIO, List, Optional

And now it's worked

Metadata

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