CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.91k stars 235 forks source link

ImportError: cannot import name 'Mapping' from 'collections' error when importing PyInquirer | HAS SOLUTION #198

Open BJunee opened 1 year ago

BJunee commented 1 year ago

I ran the test script, and it kept giving me this error. All I had to do was go into from_dict.py and go to line 9 and turn it from:

from collections import Mapping

to

from collections.abc import Mapping

I might branch it and fix it... who knows...

Stackoverflow thread with fix

JAY-TRIVEDI-007 commented 1 year ago

This error is becuase you are using Python 3.10 or above. If you use Python 3.6 or above you won't get this error.

I had the same error.

gregoriopellegrino commented 11 months ago

Same error here, thank you for the fix

Frankz commented 11 months ago

I ran the test script, and it kept giving me this error. All I had to do was go into from_dict.py and go to line 9 and turn it from:

from collections import Mapping

to

from collections.abc import Mapping

I might branch it and fix it... who knows...

Stackoverflow thread with fix

Thank you!! it works

tertek commented 7 months ago

this issue makes PyInquirer unusable

thunermay commented 4 months ago

Why is this not added? Is this package not maintained? This shouldn't be much of a hassle. I hope someone looks into this <3 Thank you :)

BJunee commented 4 months ago

Why is this not added? Is this package not maintained? This shouldn't be much of a hassle. I hope someone looks into this <3 Thank you :)

No, this project is not being maintained.

andrewvaughan commented 4 months ago

It's not as mature, but I use this, instead:

https://github.com/magmax/python-inquirer

Super shame that such a small change causes an issue like this... breaking changes shouldn't occur on minor version releases (I'm looking at you Python 3).