Schrolli91 / BOSWatch

Python Script to process input data from rtl_fm and multimon-NG - multiple Plugin support
https://bwcc.boswatch.de
GNU General Public License v2.0
133 stars 59 forks source link

Telegram Plugin startet nicht - Python Verision? #488

Closed Leitner1 closed 3 years ago

Leitner1 commented 3 years ago

Hallo zusammen,

ich bekomme das Telegram Plugin nicht zum laufen. Sonst ist kein Plugin aktiviert. SW Version: 2.5.1, Branch: master

Fehlermeldung:

13.10.2020 19:48:28 - pluginLoader    [ERROR   ] error loading plugin: Telegram
13.10.2020 19:48:28 - pluginLoader    [DEBUG   ] error loading plugin: Telegram
Traceback (most recent call last):
  File "/opt/boswatch/includes/pluginLoader.py", line 32, in loadPlugins
    plugin = loadPlugin(i)
  File "/opt/boswatch/includes/pluginLoader.py", line 106, in loadPlugin
    return imp.load_module(plugin["name"], *plugin["info"])
  File "/opt/boswatch/plugins/Telegram/Telegram.py", line 14, in <module>
    import telegram
  File "/usr/local/lib/python2.7/dist-packages/telegram/__init__.py", line 21, in <module>
    from .base import TelegramObject
  File "/usr/local/lib/python2.7/dist-packages/telegram/base.py", line 42
    _id_attrs: Tuple[Any, ...] = ()
             ^
SyntaxError: invalid syntax

Wie ich hier gefunden habe, benötigt der Python-Telegram-Bot min Python 3.6 https://stackoverflow.com/questions/64316706/python-telegram-bot-syntax-error-for-the-line-id-attrs-tupleany

Ich habe in der "~/.bashrc" einen alias angelegt "alias python='/usr/bin/python3.7'". Wenn ich die Version mit "python --version" abfrage kommt "Python 3.7.3" zurück.

Der Python-Telegram-Bot ist für beide Versionen installiert: /usr/local/lib/python2.7/dist-packages/telegram und /usr/local/lib/python3.7/dist-packages/telegram

Ich habe leider keinen näheren Kenntnisse über Python und meine Linux Kenntnisse sind auch nur rudimentär.

Hardware ist ein RPI 1B mit dem Image: 2020-08-20-raspios-buster-armhf-lite

Jemand eine Idee? Sonst setze ich einfach alles nochmals auf....

Danke und viele Grüße Leitner

Leitner1 commented 3 years ago

hat sich erledigt... ich habe alles deinstalliert, python zurück auf Version 2.7.16 gestellt und mit "sudo pip install python-telegram-bot==11.0.0" installiert. So wie hier: https://github.com/Schrolli91/BOSWatch/issues/469#issuecomment-678979340 Sorry ich war zu doof die Suche richtig zu verwendet!