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

Can't import modules #4

Open
catty-dev opened this issue Dec 23, 2022 · 1 comment
Open

Can't import modules #4

catty-dev opened this issue Dec 23, 2022 · 1 comment

Comments

@catty-dev
Copy link

Traceback (most recent call last):
File "/home/ubuntu/TR-CMD/bot.py", line 12, in
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
File "/usr/local/lib/python3.10/dist-packages/telegram/init.py", line 45, in
from .files.file import File
File "/usr/local/lib/python3.10/dist-packages/telegram/files/file.py", line 22, in
from future.backports.urllib import parse as urllib_parse
File "/usr/local/lib/python3.10/dist-packages/future/backports/init.py", line 17, in
from .misc import (ceil,
File "/usr/local/lib/python3.10/dist-packages/future/backports/misc.py", line 19, in
from collections import Mapping, MutableMapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/init.py)

I've installed all requirements

@MParvin
Copy link
Owner

MParvin commented Mar 22, 2024

Sorry for late answer :(
According to the following error,, here is an issue for the "collection" module in python 3.10.

from collections import Mapping, MutableMapping

In python3.10 some part of the "collection" module have been moved to the 'collections.abc' module.

so, please use python3.9 or lower to fix this error.

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

2 participants