Bug(caissedepargne): Unable to find element //script[contains(@src, "main-")]
Hi,
With which module do you encounter problems?
Since this morning I am unable to connect to my account using caissedepargne module. It seems related to the same issue for banquepopulaire (#553 (closed)), but unfortunatly I was unable to fix it using the related commit.
Paste here the stacktrace or error message you observe
Account Balance Coming
---------------------------------------------------------+----------+----------
2022-05-11 18:33:19,851:DEBUG:bcall:3.0:bcall.py:92:backend_process <Backend 'caissedepargne'>: Calling function <bound method Application._do_complete of <woob.applications.bank.bank.Appbank object at 0x7faaa5df5be0>>
2022-05-11 18:33:19,851:DEBUG:bcall:3.0:bcall.py:101:backend_process <Backend 'caissedepargne'>: Called function <bound method Application._do_complete of <woob.applications.bank.bank.Appbank object at 0x7faaa5df5be0>> returned: <generator object Application._do_complete_iter at 0x7faaa291c270>
2022-05-11 18:33:19,854:DEBUG:urllib3.util.retry:3.0:retry.py:333:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2022-05-11 18:33:19,858:DEBUG:urllib3.util.retry:3.0:retry.py:333:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2022-05-11 18:33:19,956:DEBUG:modules:3.0:modules.py:166:load_module Loaded module "linebourse" from /home/banq/.local/share/woob/modules/3.0/linebourse
2022-05-11 18:33:19,957:DEBUG:urllib3.util.retry:3.0:retry.py:333:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2022-05-11 18:33:19,957:DEBUG:urllib3.util.retry:3.0:retry.py:333:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2022-05-11 18:33:19,958:INFO:backend.caissedepargne.browser:3.0:switch.py:90:set_browser using 'main' browser
2022-05-11 18:33:19,960:DEBUG:urllib3.util.retry:3.0:retry.py:333:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2022-05-11 18:33:19,961:DEBUG:urllib3.util.retry:3.0:retry.py:333:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2022-05-11 18:33:19,967:DEBUG:urllib3.util.retry:3.0:retry.py:333:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2022-05-11 18:33:19,967:DEBUG:urllib3.util.retry:3.0:retry.py:333:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2022-05-11 18:33:19,969:INFO:backend.caissedepargne.browser:3.0:switch.py:90:set_browser using 'main' browser
2022-05-11 18:33:19,970:DEBUG:backend.caissedepargne.browser:3.0:woob_browser.py:79:_load_cookies Reloaded cookies from storage
2022-05-11 18:33:19,975:DEBUG:urllib3.connectionpool:3.0:connectionpool.py:971:_new_conn Starting new HTTPS connection (1): www.caisse-epargne.fr:443
2022-05-11 18:33:20,106:DEBUG:urllib3.connectionpool:3.0:connectionpool.py:452:_make_request https://www.caisse-epargne.fr:443 "GET /se-connecter/sso?service=dei HTTP/1.1" 200 820
2022-05-11 18:33:20,129:DEBUG:backend.caissedepargne.browser:3.0:browsers.py:880:internal_callback Handle https://www.caisse-epargne.fr/se-connecter/sso?service=dei with NewLoginPage
2022-05-11 18:33:20,133:DEBUG:urllib3.connectionpool:3.0:connectionpool.py:971:_new_conn Starting new HTTPS connection (1): www.as-ex-ano-groupe.caisse-epargne.fr:443
2022-05-11 18:33:20,354:DEBUG:urllib3.connectionpool:3.0:connectionpool.py:452:_make_request https://www.as-ex-ano-groupe.caisse-epargne.fr:443 "POST /api/oauth/token HTTP/1.1" 200 None
2022-05-11 18:33:20,358:DEBUG:backend.caissedepargne.browser:3.0:browsers.py:880:internal_callback Handle https://www.as-ex-ano-groupe.caisse-epargne.fr/api/oauth/token with TokenPage
2022-05-11 18:33:20,361:DEBUG:urllib3.connectionpool:3.0:connectionpool.py:971:_new_conn Starting new HTTPS connection (1): www.rs-ex-ano-groupe.caisse-epargne.fr:443
2022-05-11 18:33:20,609:DEBUG:urllib3.connectionpool:3.0:connectionpool.py:452:_make_request https://www.rs-ex-ano-groupe.caisse-epargne.fr:443 "POST /bapi/user/v1/users/identificationRouting HTTP/1.1" 200 None
2022-05-11 18:33:20,613:DEBUG:backend.caissedepargne.browser:3.0:browsers.py:880:internal_callback Handle https://www.rs-ex-ano-groupe.caisse-epargne.fr/bapi/user/v1/users/identificationRouting with LoginApi
2022-05-11 18:33:20,670:DEBUG:urllib3.connectionpool:3.0:connectionpool.py:452:_make_request https://www.caisse-epargne.fr:443 "GET /se-connecter/sso?service=dei HTTP/1.1" 200 820
2022-05-11 18:33:20,691:DEBUG:backend.caissedepargne.browser:3.0:browsers.py:880:internal_callback Handle https://www.caisse-epargne.fr/se-connecter/sso?service=dei with NewLoginPage
Bug(caissedepargne): Unable to find element //script[contains(@src, "main-")]
(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/banq/woob/lib/python3.9/site-packages/woob/browser/filters/html.py", line 108, in filter
return u'%s' % el[0].attrib[self.attr]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/banq/woob/lib/python3.9/site-packages/woob/core/bcall.py", line 106, in backend_process
for subresult in result:
File "/home/banq/woob/lib/python3.9/site-packages/woob/tools/application/base.py", line 328, in _do_complete_iter
for i, sub in enumerate(res):
File "/home/banq/.local/share/woob/modules/3.0/caissedepargne/module.py", line 86, in iter_accounts
for account in self.browser.get_accounts_list():
File "/home/banq/woob/lib/python3.9/site-packages/woob/browser/switch.py", line 100, in wrapper
return val(*args, **kwargs)
File "/home/banq/woob/lib/python3.9/site-packages/woob/browser/retry.py", line 77, in wrapper
ret = cb()
File "/home/banq/woob/lib/python3.9/site-packages/woob/browser/retry.py", line 73, in <lambda>
cb = lambda: func(browser, *args, **kwargs)
File "/home/banq/woob/lib/python3.9/site-packages/woob/browser/browsers.py", line 981, in inner
browser.do_login()
File "/home/banq/.local/share/woob/modules/3.0/caissedepargne/compat/woob_browser.py", line 436, in do_double_authentication
self.init_login()
File "/home/banq/.local/share/woob/modules/3.0/caissedepargne/browser.py", line 284, in init_login
return self.do_new_login()
File "/home/banq/.local/share/woob/modules/3.0/caissedepargne/browser.py", line 968, in do_new_login
main_js_file = self.page.get_main_js_file_url()
File "/home/banq/.local/share/woob/modules/3.0/caissedepargne/pages.py", line 89, in get_main_js_file_url
return Attr('//script[contains(@src, "main-")]', 'src')(self.doc)
File "/home/banq/woob/lib/python3.9/site-packages/woob/browser/filters/base.py", line 184, in __call__
return self.filter(self.select(self.selector, item))
File "/home/banq/woob/lib/python3.9/site-packages/woob/browser/filters/base.py", line 133, in print_debug
res = function(self, value)
File "/home/banq/woob/lib/python3.9/site-packages/woob/browser/filters/html.py", line 110, in filter
return self.default_or_raise(XPathNotFound('Unable to find element %s' % self.selector))
File "/home/banq/woob/lib/python3.9/site-packages/woob/browser/filters/base.py", line 71, in default_or_raise
raise exception
woob.browser.filters.html.XPathNotFound: Unable to find element //script[contains(@src, "main-")]
---------------------------------------------------------+----------+----------
2022-05-11 18:33:20,755:DEBUG:backend.caissedepargne.browser:3.0:woob_browser.py:125:dump_state Stored cookies into storage
2022-05-11 18:33:20,785:DEBUG:woob.config:3.0:yamlconfig.py:96:save Configuration file saved: /home/banq/.config/woob/bank.storage.