N26: Bad request on login
Hello,
I'm trying to list my account on n26, and get the following error:
boobank list --backends n26 --debug
2020-09-23 08:59:04,173:DEBUG:bcall:2.0:bcall.py:92:backend_process <Backend 'n26'>: Calling function iter_resources
2020-09-23 08:59:04,178:DEBUG:urllib3.util.retry:2.0:retry.py:230:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2020-09-23 08:59:04,178:DEBUG:urllib3.util.retry:2.0:retry.py:230:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2020-09-23 08:59:04,180:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:939:_new_conn Starting new HTTPS connection (1): api.tech26.de:443
2020-09-23 08:59:04,345:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:433:_make_request https://api.tech26.de:443 "POST /oauth2/token HTTP/1.1" 400 303
2020-09-23 08:59:04,346:DEBUG:bcall:2.0:bcall.py:98:backend_process <Backend 'n26'>: Called function iter_resources raised an error: JSONDecodeError('Expecting value: line 1 column 1 (char 0)')
Bug(n26): Expecting value: line 1 column 1 (char 0)
(If --auto-update is passed on the command-line, new versions of the module will be checked automatically)
Traceback (most recent call last):
File "/home/ro/.local/share/weboob/modules/2.0/n26/browser.py", line 141, in do_login
result = self.request('/oauth2/token', data=data)
File "/home/ro/.local/share/weboob/modules/2.0/n26/browser.py", line 61, in request
return self.open(*args, **kwargs).json()
File "/usr/lib/python3.8/site-packages/weboob/browser/browsers.py", line 630, in open
return super(DomainBrowser, self).open(req, *args, **kwargs)
File "/usr/lib/python3.8/site-packages/weboob/browser/browsers.py", line 374, in open
response = self.session.send(preq,
File "/usr/lib/python3.8/site-packages/weboob/browser/sessions.py", line 162, in send
return func(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/weboob/browser/sessions.py", line 155, in func
return callback(self, resp)
File "/usr/lib/python3.8/site-packages/weboob/browser/browsers.py", line 370, in inner_callback
self.raise_for_status(response)
File "/usr/lib/python3.8/site-packages/weboob/browser/browsers.py", line 410, in raise_for_status
raise cls(http_error_msg, response=response)
weboob.browser.exceptions.ClientError: 400 Client Error: Bad Request
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/weboob/core/bcall.py", line 96, in backend_process
result = getattr(backend, function)(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/weboob/capabilities/bank.py", line 641, in iter_resources
return self.iter_accounts()
File "/home/ro/.local/share/weboob/modules/2.0/n26/module.py", line 61, in iter_accounts
return self.browser.get_accounts()
File "/usr/lib/python3.8/site-packages/weboob/browser/browsers.py", line 821, in inner
browser.do_login()
File "/home/ro/.local/share/weboob/modules/2.0/n26/browser.py", line 146, in do_login
json_response = ex.response.json()
File "/usr/lib/python3.8/site-packages/requests/models.py", line 898, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
By the way, there is another python project for interacting with n26 (https://github.com/femueller/python-n26/), maybe some development effort could be coordinated between the two ?
Thank you !