telegram-shell-bot
telegram-shell-bot copied to clipboard
bot.py fails with type error "object is not subscriptable" line 78
Python 3.8.0 Poetry (version 1.3.2)
Traceback (most recent call last):
File "bot.py", line 78, in <module>
def __is_out_all(cmd: str) -> tuple[str, bool]:
TypeError: 'type' object is not subscriptable
Installed miniconda - running python 3.10 now getting new errors about missing modules.
ModuleNotFoundError: No module named 'delegator'
ModuleNotFoundError: No module named 'telegram'
Installed those with pip, new errors:
Traceback (most recent call last):
File "/home/ben/src/telegram-shell-bot/bot.py", line 7, in <module>
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, constants
ImportError: cannot import name 'InlineKeyboardButton' from 'telegram' (/home/ben/miniconda3/lib/python3.10/site-packages/telegram/__init__.py)
The correct dependance is
python-telegram-bot = "^13.14"
"delegator.py" = "^0.1.1"
Same errors here, i checked pyproject.toml
and contains the information that @vicalloy mention:
pyproject.toml:python-telegram-bot = "^13.14"
pyproject.toml:"delegator.py" = "^0.1.1"
Any solution ?