[bp] Bug(bp): list index out of range
With which module do you encounter problems?
BP
Describe the problem you encounter
Bug(bp): list index out of range
Paste here the stacktrace or error message you observe
jaxx@microdeb:~$ ~/.local/bin/woob bank -q -n 50 --debug ls
2023-06-15 08:02:25,567:DEBUG:woob.config:3.6:yamlconfig.py:72:load Loading configuration file: /home/jaxx/.config/woob/bank.storage.
2023-06-15 08:02:25,569:DEBUG:woob.config:3.6:yamlconfig.py:76:load Configuration file loaded: /home/jaxx/.config/woob/bank.storage.
2023-06-15 08:02:25,761:DEBUG:woob.core.modules.loader:3.6:modules.py:250:load_module Loaded module "bp" from /home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp
/home/jaxx/.local/lib/python3.9/site-packages/woob/tools/backend.py:355: DeprecationWarning: Class attribute BPModule.VERSION is now unused and deprecated, you can remove it. If you do so, do not forget to increase the woob version to at least 3.4 in requirements.txt.
warnings.warn(
2023-06-15 08:02:25,763:DEBUG:woob.backend:3.6:modules.py:160:create_instance Created backend "bp" for module "bp"
2023-06-15 08:02:25,764:DEBUG:woob.config:3.6:iniconfig.py:43:load Loading application configuration file: /home/jaxx/.config/woob/bank.
2023-06-15 08:02:25,764:DEBUG:woob.config:3.6:iniconfig.py:60:load Application configuration file loaded: /home/jaxx/.config/woob/bank.
/home/jaxx/.local/lib/python3.9/site-packages/woob/tools/misc.py:265: DeprecationWarning: Use woob.tools.application.pretty.BOLD instead.
That's also better to use woob.tools.application.pretty.colored.
return self.f(owner)
/home/jaxx/.local/lib/python3.9/site-packages/woob/tools/misc.py:265: DeprecationWarning: Use woob.tools.application.pretty.NC instead.
That's also better to use woob.tools.application.pretty.colored.
return self.f(owner)
Account Balance Coming
---------------------------------------------------------+----------+----------
2023-06-15 08:02:25,776:DEBUG:woob.core.bcall:3.6:bcall.py:86:backend_process <Backend bp>: Calling function <bound method Application._do_complete of <woob.applications.bank.bank.Appbank object at 0xffffb3fddd00>>
2023-06-15 08:02:25,778:DEBUG:urllib3.util.retry:3.6:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2023-06-15 08:02:25,781:DEBUG:urllib3.util.retry:3.6:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2023-06-15 08:02:25,789:DEBUG:urllib3.util.retry:3.6:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2023-06-15 08:02:25,789:DEBUG:urllib3.util.retry:3.6:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2023-06-15 08:02:25,794:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:1014:_new_conn Starting new HTTPS connection (1): voscomptesenligne.labanquepostale.fr:443
2023-06-15 08:02:25,979:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:473:_make_request https://voscomptesenligne.labanquepostale.fr:443 "GET /wsost/OstBrokerWeb/loginform?TAM_OP=login&ERROR_CODE=0x00000000&URL=%2Fvoscomptes%2FcanalXHTML%2Fidentif.ea%3Forigin%3Dparticuliers HTTP/1.1" 200 None
2023-06-15 08:02:25,989:DEBUG:woob.backend.bp.browser:3.6:browsers.py:1004:internal_callback Handle https://voscomptesenligne.labanquepostale.fr/wsost/OstBrokerWeb/loginform?TAM_OP=login&ERROR_CODE=0x00000000&URL=%2Fvoscomptes%2FcanalXHTML%2Fidentif.ea%3Forigin%3Dparticuliers with LoginPage
2023-06-15 08:02:25,991:DEBUG:woob.core.bcall:3.6:bcall.py:92:backend_process <Backend bp>: Called function <bound method Application._do_complete of <woob.applications.bank.bank.Appbank object at 0xffffb3fddd00>> raised an error: IndexError('list index out of range')
Bug(bp): list index out of range
(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/jaxx/.local/lib/python3.9/site-packages/woob/core/bcall.py", line 88, in backend_process
result = function(backend, *args, **kwargs)
File "/home/jaxx/.local/lib/python3.9/site-packages/woob/tools/application/base.py", line 348, in _do_complete
res = getattr(backend, function)(*args, **kwargs)
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/module.py", line 177, in iter_resources
return self.iter_accounts()
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/module.py", line 76, in iter_accounts
return self.browser.get_accounts_list()
File "/home/jaxx/.local/lib/python3.9/site-packages/woob/browser/browsers.py", line 1118, in inner
browser.do_login()
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/browser.py", line 505, in do_login
self.login_without_2fa()
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/browser.py", line 475, in login_without_2fa
self.page.login(self.username, self.password)
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/pages/login.py", line 101, in login
vk = Keyboard(self)
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/pages/login.py", line 61, in __init__
img_url = page.doc.xpath('//img[@id="imageCVS"]')[0].attrib['src']
IndexError: list index out of range
---------------------------------------------------------+----------+----------
2023-06-15 08:02:26,083:DEBUG:woob.backend.bp.browser:3.6:browsers.py:1256:dump_state Stored cookies into storage
2023-06-15 08:02:26,086:DEBUG:woob.config:3.6:yamlconfig.py:90:save Configuration file saved: /home/jaxx/.config/woob/bank.storage.
jaxx@microdeb:~$
jaxx@microdeb:~$ woob bank
Welcome to bank v3.6
Copyright(C) 2010-2023 Romain Bignon, Christophe Benz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Type "help" to display available commands.
Loaded backends: bp
bank> logging debug
bank> ls
Account Balance Coming
------------------------------------------+----------+----------
2023-06-15 08:12:00,770:DEBUG:woob.core.bcall:3.6:bcall.py:86:backend_process <Backend bp>: Calling function <bound method Application._do_complete of <woob.applications.bank.bank.Appbank object at 0xffffb5943be0>>
2023-06-15 08:12:00,772:DEBUG:urllib3.util.retry:3.6:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2023-06-15 08:12:00,776:DEBUG:urllib3.util.retry:3.6:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2023-06-15 08:12:00,783:DEBUG:urllib3.util.retry:3.6:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2023-06-15 08:12:00,783:DEBUG:urllib3.util.retry:3.6:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2023-06-15 08:12:00,789:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:1014:_new_conn Starting new HTTPS connection (1): voscomptesenligne.labanquepostale.fr:443
2023-06-15 08:12:00,958:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:473:_make_request https://voscomptesenligne.labanquepostale.fr:443 "GET /wsost/OstBrokerWeb/loginform?TAM_OP=login&ERROR_CODE=0x00000000&URL=%2Fvoscomptes%2FcanalXHTML%2Fidentif.ea%3Forigin%3Dparticuliers HTTP/1.1" 200 None
2023-06-15 08:12:00,967:DEBUG:woob.backend.bp.browser:3.6:browsers.py:1004:internal_callback Handle https://voscomptesenligne.labanquepostale.fr/wsost/OstBrokerWeb/loginform?TAM_OP=login&ERROR_CODE=0x00000000&URL=%2Fvoscomptes%2FcanalXHTML%2Fidentif.ea%3Forigin%3Dparticuliers with LoginPage
2023-06-15 08:12:00,970:DEBUG:woob.core.bcall:3.6:bcall.py:92:backend_process <Backend bp>: Called function <bound method Application._do_complete of <woob.applications.bank.bank.Appbank object at 0xffffb5943be0>> raised an error: IndexError('list index out of range')
Bug(bp): list index out of range
(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/jaxx/.local/lib/python3.9/site-packages/woob/core/bcall.py", line 88, in backend_process
result = function(backend, *args, **kwargs)
File "/home/jaxx/.local/lib/python3.9/site-packages/woob/tools/application/base.py", line 348, in _do_complete
res = getattr(backend, function)(*args, **kwargs)
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/module.py", line 177, in iter_resources
return self.iter_accounts()
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/module.py", line 76, in iter_accounts
return self.browser.get_accounts_list()
File "/home/jaxx/.local/lib/python3.9/site-packages/woob/browser/browsers.py", line 1118, in inner
browser.do_login()
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/browser.py", line 505, in do_login
self.login_without_2fa()
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/browser.py", line 475, in login_without_2fa
self.page.login(self.username, self.password)
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/pages/login.py", line 101, in login
vk = Keyboard(self)
File "/home/jaxx/.local/share/woob/modules/3.6/woob_modules/bp/pages/login.py", line 61, in __init__
img_url = page.doc.xpath('//img[@id="imageCVS"]')[0].attrib['src']
IndexError: list index out of range
------------------------------------------+----------+----------
bank> quit
What are the steps to reproduce the problem?
What woob version are you using?
Woob config v3.6 Copyright(C) 2010-2023 Christophe Benz, Romain Bignon
What module version are you using?
.------------------------------------------------------------------------------.
| Module bp |
+-----------------.------------------------------------------------------------'
| Version | 202305231553
| Maintainer | Nicolas Duhamel <nicolas@jombi.fr>
| License | LGPLv3+
| Description | La Banque Postale
| Capabilities | CapBankTransferAddRecipient, CapTransfer, CapBankWealth, CapBank, CapContact, CapCredentialsCheck, CapProfile, CapBankTransfer, CapDocument, CapCollection
| Installed | yes
| Location | https://updates.woob.tech/3/main/bp.tar.gz
| |
| Configuration | login: Identifiant (default: )
| | password: Mot de passe (default: )
| | website: Type de compte (default: par)
'-----------------'
How did you install woob?
pip
was 3.4, redid install with ==3.6, and updated modules, back to the same error
Seems ~ in sync with some visual changes on the banks website
Additional info you'd like to mention
also hitting #641 (closed) with --auto-update