Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bot.py fails with type error "object is not subscriptable" line 78 #20

Open
bensig opened this issue Feb 1, 2023 · 3 comments
Open

Comments

@bensig
Copy link

bensig commented Feb 1, 2023

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
@bensig
Copy link
Author

bensig commented Feb 1, 2023

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)

@vicalloy
Copy link
Owner

vicalloy commented Feb 1, 2023

The correct dependance is

python-telegram-bot = "^13.14"
"delegator.py" = "^0.1.1"

@telekomancer
Copy link

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants