Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix Firebase_Admin Error TypeError: __init__() got an unexpected keyword argument 'status'

I'm new to Firebase and I am following their tutorial online. I'm trying to authenticate into a quick DB that I created with a few records. I'm getting the error: TypeError: init() got an unexpected keyword argument 'status'

I've made sure my urllib3 is up to date and confirmed my firebase_Admin is up to date. I've checked my file path for json file and copied my database URL into it.

import firebase_admin
from firebase_admin import credentials
from firebase_admin import db

#Generated from settings of a project.
cred = credentials.Certificate(r"Path to json file in the same directory as program")

firebase_admin.initialize_app(cred, {'databaseURL': 'https://mydatabase_from_firebase/'} )

I am expecting for a return of 0, confirming it worked, but instead I am getting the error results below:

TypeError: __init__() got an unexpected keyword argument 'status'

Full traceback is:

Traceback (most recent call last): File "C:/Users/Gaming/Firbase_setup/test.py", line 3, in from firebase_admin import db File "C:\Users\Gaming\Firbase_setup\venv\lib\site-packages\firebase_admin\db.py", line 33, in from firebase_admin import _http_client File "C:\Users\Gaming\Firbase_setup\venv\lib\site-packages\firebase_admin_http_client.py", line 32, in raise_on_status=False, backoff_factor=0.5) TypeError: init() got an unexpected keyword argument 'status'

like image 368
killsburydouboy Avatar asked May 19 '19 23:05

killsburydouboy


1 Answers

uninstall the older version of requests

pip uninstall requests

and install the latest one

pip install requests
like image 190
Sushang Agnihotri Avatar answered Nov 15 '22 20:11

Sushang Agnihotri