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

ImportError: cannot import name 'Mapping' from 'collections' #20

Open
Mte90 opened this issue Oct 23, 2023 · 1 comment
Open

ImportError: cannot import name 'Mapping' from 'collections' #20

Mte90 opened this issue Oct 23, 2023 · 1 comment

Comments

@Mte90
Copy link

Mte90 commented Oct 23, 2023

I am getting this error with python 3.11 but the readme doesn't specify the python version required.
Looking atthe version seems that PyInquirer uses an old version of prompt_toolkit, that project has a ticket CITGuru/PyInquirer#181 and the whole project seems abandoned

Traceback (most recent call last):
  File "/home/mte90/Desktop/kde/SteamGiftBot/main.py", line 12, in <module>
    import client as clientLog
  File "/home/mte90/Desktop/kde/SteamGiftBot/client.py", line 11, in <module>
    from PyInquirer import ValidationError, Validator, prompt
  File "/home/mte90/Desktop/kde/SteamGiftBot/env/lib/python3.11/site-packages/PyInquirer/__init__.py", line 6, in <module>
    from prompt_toolkit.token import Token
  File "/home/mte90/Desktop/kde/SteamGiftBot/env/lib/python3.11/site-packages/prompt_toolkit/__init__.py", line 16, in <module>
    from .interface import CommandLineInterface
  File "/home/mte90/Desktop/kde/SteamGiftBot/env/lib/python3.11/site-packages/prompt_toolkit/interface.py", line 19, in <module>
    from .application import Application, AbortAction
  File "/home/mte90/Desktop/kde/SteamGiftBot/env/lib/python3.11/site-packages/prompt_toolkit/application.py", line 8, in <module>
    from .key_binding.bindings.basic import load_basic_bindings
  File "/home/mte90/Desktop/kde/SteamGiftBot/env/lib/python3.11/site-packages/prompt_toolkit/key_binding/bindings/basic.py", line 9, in <module>
    from prompt_toolkit.renderer import HeightIsUnknownError
  File "/home/mte90/Desktop/kde/SteamGiftBot/env/lib/python3.11/site-packages/prompt_toolkit/renderer.py", line 11, in <module>
    from prompt_toolkit.styles import Style
  File "/home/mte90/Desktop/kde/SteamGiftBot/env/lib/python3.11/site-packages/prompt_toolkit/styles/__init__.py", line 8, in <module>
    from .from_dict import *
  File "/home/mte90/Desktop/kde/SteamGiftBot/env/lib/python3.11/site-packages/prompt_toolkit/styles/from_dict.py", line 9, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.11/collections/__init__.py)
@PalmaLuv
Copy link
Owner

PalmaLuv commented Jan 21, 2024

Many thanks, found a InquirerPy [link] analog that is much newer than PyInquirer (latest release June 28, 2022), which will definitely be supported on newer versions of python.

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