Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: __init__() got an unexpected keyword argument 'strict' #84

Open
Jacquwes opened this issue Jul 23, 2018 · 1 comment
Open

Comments

@Jacquwes
Copy link

Hi, the following code returns an error in python 3.6.6 :

from firebase import firebase
firebase = firebase.FirebaseApplication('https://discord-bo.firebaseio.com/version', None)
result = firebase.get('version', None) # The error happens here
print(result)

And here is the error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python36\lib\site-packages\firebase\decorators.py", line 19, in wrapped
    return f(*args, **kwargs)
  File "C:\Program Files\Python36\lib\site-packages\firebase\firebase.py", line 274, in get
    return make_get_request(endpoint, params, headers, connection=connection)
  File "C:\Program Files\Python36\lib\site-packages\firebase\decorators.py", line 19, in wrapped
    return f(*args, **kwargs)
  File "C:\Program Files\Python36\lib\site-packages\firebase\firebase.py", line 38, in make_get_request
    response = connection.get(url, params=params, headers=headers, timeout=timeout)
  File "C:\Program Files\Python36\lib\site-packages\requests\sessions.py", line 310, in get
    return self.request('GET', url, **kwargs)
  File "C:\Program Files\Python36\lib\site-packages\requests\sessions.py", line 279, in request
    resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
  File "C:\Program Files\Python36\lib\site-packages\requests\sessions.py", line 374, in send
    r = adapter.send(request, **kwargs)
  File "C:\Program Files\Python36\lib\site-packages\requests\adapters.py", line 174, in send
    timeout=timeout
  File "C:\Program Files\Python36\lib\site-packages\requests\packages\urllib3\connectionpool.py", line         417, in urlopen
    conn = self._get_conn(timeout=pool_timeout)
  File "C:\Program Files\Python36\lib\site-packages\requests\packages\urllib3\connectionpool.py", line     232, in _get_conn
    return conn or self._new_conn()
  File "C:\Program Files\Python36\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 547, in _new_conn
    strict=self.strict)
TypeError: __init__() got an unexpected keyword argument 'strict'

And if i replace the third line with

result = firebase.get_async('version', None)

It returns

None

Thanks !

@aleksilahis
Copy link

I'm using Python 3.7 and got this issue fixed by upgrading requests to the latest version (from 1.1.0 to 2.x). Maybe that could be mentioned in README?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants