PyInquirer icon indicating copy to clipboard operation
PyInquirer copied to clipboard

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

Open BJunee opened this issue 2 years ago • 7 comments

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

BJunee avatar Apr 13 '23 21:04 BJunee

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.

JAY-TRIVEDI-007 avatar May 06 '23 06:05 JAY-TRIVEDI-007

Same error here, thank you for the fix

gregoriopellegrino avatar Jul 10 '23 08:07 gregoriopellegrino

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

Frankz avatar Jul 14 '23 21:07 Frankz

this issue makes PyInquirer unusable

tertek avatar Nov 29 '23 13:11 tertek

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 :)

thunermay avatar Feb 17 '24 11:02 thunermay

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.

BJunee avatar Feb 23 '24 22:02 BJunee

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).

andrewvaughan avatar Mar 04 '24 09:03 andrewvaughan