wapi-python icon indicating copy to clipboard operation
wapi-python copied to clipboard

Maximum recursion depth error when calling autheticate method

Open collin5 opened this issue 4 years ago • 3 comments

Steps to reproduce

import wapi
session = wapi.Session(client_id=****, client_secret=****)
session.auth._authenticate()

Current result

  File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/parse.py", line 534, in urljoin
    urlparse(base, '', allow_fragments)
  File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/parse.py", line 393, in urlparse
    splitresult = urlsplit(url, scheme, allow_fragments)
  File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/parse.py", line 458, in urlsplit
    url, scheme, _coerce_result = _coerce_args(url, scheme)
  File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/parse.py", line 120, in _coerce_args
    str_input = isinstance(args[0], str)
RecursionError: maximum recursion depth exceeded while calling a Python object

Expected result* It should be able to authenticate successfully with correct credentials

collin5 avatar Nov 16 '22 18:11 collin5

Use case for this is when trying to re-authenticate after session expires

collin5 avatar Nov 16 '22 18:11 collin5

Hi @collin5. Thanks for reporting.

It is a bug in wapi-python 0.7.8. We have a patch to fix this issue in the pre-release version 0.7.9rc1. Would be nice if you could pin this exact version in your script to use it. We will release the stable 0.7.9 early next week.

hieuhc avatar Nov 18 '22 08:11 hieuhc

Great, thank you.

collin5 avatar Nov 18 '22 15:11 collin5