Pyrebase icon indicating copy to clipboard operation
Pyrebase copied to clipboard

Error: cannot import name 'Mapping' from 'collections'

Open mansidak opened this issue 2 years ago • 5 comments

I made sure all of these:

[] Check that your version of Python is 3.4+ [] Check that you are on the newest version of Pyrebase [] Check that Email/password provider is enabled in your Firebase dashboard under Auth -> Sign In Method.

But I keep getting error: Error: cannot import name 'Mapping' from 'collections' (/home/ubuntu/miniconda/lib/python3.10/collections/init.py)

I belive Pyrebase is compatible with Python2 and not Python3. Thoughts on what's causing this error?

mansidak avatar Mar 04 '23 18:03 mansidak

Ran into the same issue. I used pyenv to switch my python version to 3.9.13. I haven't had the issue again.

IronRocket avatar Mar 12 '23 19:03 IronRocket

@IronRocket So you downgraded from 3.10.9?

mansidak avatar Mar 14 '23 20:03 mansidak

  • downgrade to Python3.9
  • uninstall pycryptodome
  • reinstall pycryptodome to the newest version (pip will give you a dependency error, just ignore it)

bvechiato avatar Apr 07 '23 12:04 bvechiato

Yeah its a bummer that this isn't compatible with python3.10+. Decided to not use it and just go with native firebase package again like I've done before.

droneshire avatar Apr 29 '23 18:04 droneshire

For future reference firebase-rest-api supports 3.10 and 3.11 as well.

AsifArmanRahman avatar Jun 20 '23 20:06 AsifArmanRahman