ImportError: cannot import name 'JSONDecodeError' from 'requests.compat'

320 views Asked by At

Getting error while importing pyrebase in Google colab I tried to reinstall all packages but still getting error

firesbase=pyrebase.initialize_app(config)
db=firebase.database()

Getting Error

ImportError                               Traceback (most recent call last)
<ipython-input-23-9421afe031fe> in <cell line: 1>()
----> 1 import pyrebase
      2 config={
      3     "apiKey" : "AIzaSyCOaFB61KYfwAEB_oo9YDQuRI10OfHilTY",
      4     "authDomain" : "account-manager-dc07f.firebaseapp.com",
      5     "databaseURL" : "https://account-manager-dc07f-default-rtdb.firebaseio.com",

3 frames
/usr/local/lib/python3.10/dist-packages/requests/exceptions.py in <module>
      9 from urllib3.exceptions import HTTPError as BaseHTTPError
     10 
---> 11 from .compat import JSONDecodeError as CompatJSONDecodeError
     12 
     13 

ImportError: cannot import name 'JSONDecodeError' from 'requests.compat' (/usr/local/lib/python3.10/dist-packages/requests/compat.py)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
0

There are 0 answers