N26:401 error on login
With which module do you encounter problems?
n26
Describe the problem you encounter
I tried and failed to connect to my n26 account with the email/password that do otherwise work on their app
Paste here the stacktrace or error message you observe
boobank> logging debug
boobank> ls
Account Balance Coming
------------------------------------------+----------+----------
2021-08-05 19:47:47,310:DEBUG:bcall:2.0:bcall.py:92:backend_process <Backend 'n26'>: Calling function iter_resources
2021-08-05 19:47:47,311:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:272:_get_conn Resetting dropped connection: api.tech26.global
2021-08-05 19:47:48,850:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:452:_make_request https://api.tech26.global:443 "POST /oauth2/token HTTP/1.1" 401 0
2021-08-05 19:47:48,851: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/paki/.local/share/weboob/modules/2.0/n26/browser.py", line 166, in do_login
result = self.request(urljoin(base_url, '/oauth2/token'), data=data)
File "/home/paki/.local/share/weboob/modules/2.0/n26/browser.py", line 77, in request
return self.open(*args, **kwargs).json()
File "/nix/store/lwlssiz6ncijac1fa1054v79psjr7rk3-python3.8-weboob-2.0/lib/python3.8/site-packages/weboob/browser/browsers.py", line 374, in open
response = self.session.send(preq,
File "/nix/store/lwlssiz6ncijac1fa1054v79psjr7rk3-python3.8-weboob-2.0/lib/python3.8/site-packages/weboob/browser/sessions.py", line 162, in send
return func(*args, **kwargs)
File "/nix/store/lwlssiz6ncijac1fa1054v79psjr7rk3-python3.8-weboob-2.0/lib/python3.8/site-packages/weboob/browser/sessions.py", line 155, in func
return callback(self, resp)
File "/nix/store/lwlssiz6ncijac1fa1054v79psjr7rk3-python3.8-weboob-2.0/lib/python3.8/site-packages/weboob/browser/browsers.py", line 370, in inner_callback
self.raise_for_status(response)
File "/nix/store/lwlssiz6ncijac1fa1054v79psjr7rk3-python3.8-weboob-2.0/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: 401 Client Error: Unauthorized
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/lwlssiz6ncijac1fa1054v79psjr7rk3-python3.8-weboob-2.0/lib/python3.8/site-packages/weboob/core/bcall.py", line 96, in backend_process
result = getattr(backend, function)(*args, **kwargs)
File "/nix/store/lwlssiz6ncijac1fa1054v79psjr7rk3-python3.8-weboob-2.0/lib/python3.8/site-packages/weboob/capabilities/bank.py", line 641, in iter_resources
return self.iter_accounts()
File "/home/paki/.local/share/weboob/modules/2.0/n26/module.py", line 61, in iter_accounts
return self.browser.get_accounts()
File "/nix/store/lwlssiz6ncijac1fa1054v79psjr7rk3-python3.8-weboob-2.0/lib/python3.8/site-packages/weboob/browser/browsers.py", line 804, in inner
browser.do_login()
File "/home/paki/.local/share/weboob/modules/2.0/n26/browser.py", line 172, in do_login
json_response = ex.response.json()
File "/nix/store/1m7cr9d0axscydh9iqa89qglj5jjn5vs-python3.8-requests-2.25.1/lib/python3.8/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/nix/store/d6lny0154sr3yis90r8rjg54qylyz04f-python3.8-simplejson-3.17.2/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/nix/store/d6lny0154sr3yis90r8rjg54qylyz04f-python3.8-simplejson-3.17.2/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/nix/store/d6lny0154sr3yis90r8rjg54qylyz04f-python3.8-simplejson-3.17.2/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)
What are the steps to reproduce the problem?
1)Add a new n26 bank account to woob 2)Give them username/password 3)ls
What woob version are you using?
Output of woob config --version
command:
Woob config v3.0 Copyright(C) 2010-2021 Christophe Benz, Romain Bignon
What module version are you using?
Output of woob config info MODULE_NAME
command:
.------------------------------------------------------------------------------.
| Module n26 |
+-----------------.------------------------------------------------------------'
| Version | 202107232217
| Maintainer | Benjamin Bouvier <public@benj.me>
| License | LGPLv3+
| Description | Bank N26
| Capabilities | CapBank, CapCollection
| Installed | yes
| Location | https://updates.weboob.org/3.0/main/n26.tar.gz
| |
| Configuration | login: Email
| | password: Password (default: )
| | otp: None
| | request_information: None
'-----------------'
How did you install woob?
nix-shell -p python38Packages.weboo