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

后端 未结 3 1636
你的背包
你的背包 2021-01-02 12:16

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

相关标签:
3条回答
  • 2021-01-02 12:34

    This is caused due to the outdated urllib3 package. I resolved this error with the following solution. You can try it as well.

    Go to this file(Got this from the error you have given) -> C:\Users\Gaming\Firbase_setup\venv\lib\site-packages\firebase_admin_http_client.py

    Comment the following lines from firebase_admin_http_client.py:

        #from requests.packages.urllib3.util import retry
        #DEFAULT_RETRY_CONFIG = retry.Retry(
        #connect=1, read=1, status=4, status_forcelist=[500, 503],
        #raise_on_status=False, backoff_factor=0.5)
    

    Also change the init parameter as below in the same file:

    def __init__(
            self, credential=None, session=None, base_url='', headers=None,
            retries=1):
    
    0 讨论(0)
  • 2021-01-02 12:40

    Upgrading requests to current version 2.22.0 worked for me.

    As the previous answer suggests, some libraries are outdated and can cause this issue.

    0 讨论(0)
  • 2021-01-02 12:40

    Some times i getting time out error so that to reolve that

    Change init to below code

    def init( self, credential=None, session=None, base_url='', headers=None, retries=DEFAULT_RETRY_CONFIG, timeout=DEFAULT_TIMEOUT_SECONDS):

    0 讨论(0)
提交回复
热议问题