[HSBC] Bug(hsbc): 'HSBC' object has no attribute 'js_url'
With which module do you encounter problems?
Describe the problem you encounter
Any operation fails. For example trying ẁoob bank list`:
Paste here the stacktrace or error message you observe
First call:
Bug(hsbc): global flags not at the start of the expression at position 219 (line 5, column 5)
(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/user/.local/pipx/venvs/woob/lib/python3.11/site-packages/woob/core/bcall.py", line 100, in backend_process
for subresult in result:
File "/home/user/.local/pipx/venvs/woob/lib/python3.11/site-packages/woob/tools/application/base.py", line 327, in _do_complete_iter
for i, sub in enumerate(res):
File "/home/user/.local/share/woob/modules/3.6/woob_modules/hsbc/module.py", line 71, in iter_accounts
for account in self.browser.iter_account_owners():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/pipx/venvs/woob/lib/python3.11/site-packages/woob/browser/browsers.py", line 1118, in inner
browser.do_login()
File "/home/user/.local/pipx/venvs/woob/lib/python3.11/site-packages/woob/browser/mfa.py", line 201, in do_double_authentication
self.init_login()
File "/home/user/.local/share/woob/modules/3.6/woob_modules/hsbc/browser.py", line 278, in init_login
self.end_login()
File "/home/user/.local/share/woob/modules/3.6/woob_modules/hsbc/browser.py", line 290, in end_login
self.js_url = self.page.get_js_url()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/share/woob/modules/3.6/woob_modules/hsbc/pages/account_pages.py", line 78, in get_js_url
return urljoin(self.url, JSVar(CleanText('//script'), var='url')(self.doc))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/pipx/venvs/woob/lib/python3.11/site-packages/woob/browser/filters/javascript.py", line 149, in __init__
super(JSVar, self).__init__(selector, need_type=need_type, **kwargs)
File "/home/user/.local/pipx/venvs/woob/lib/python3.11/site-packages/woob/browser/filters/javascript.py", line 116, in __init__
super(JSValue, self).__init__(selector, pattern=self.pattern, template=self.to_python, **kwargs)
File "/home/user/.local/pipx/venvs/woob/lib/python3.11/site-packages/woob/browser/filters/standard.py", line 613, in __init__
self._regex = re.compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/__init__.py", line 227, in compile
return _compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/__init__.py", line 294, in _compile
p = _compiler.compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_compiler.py", line 743, in compile
p = _parser.parse(p, flags)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 982, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 457, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 843, in _parse
raise source.error('global flags not at the start '
re.error: global flags not at the start of the expression at position 219 (line 5, column 5)
Subsequent calls:
Bug(hsbc): 'HSBC' object has no attribute 'js_url'
(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/user/.local/pipx/venvs/woob/lib/python3.11/site-packages/woob/core/bcall.py", line 100, in backend_process
for subresult in result:
File "/home/user/.local/pipx/venvs/woob/lib/python3.11/site-packages/woob/tools/application/base.py", line 327, in _do_complete_iter
for i, sub in enumerate(res):
File "/home/user/.local/share/woob/modules/3.6/woob_modules/hsbc/module.py", line 71, in iter_accounts
for account in self.browser.iter_account_owners():
File "/home/user/.local/share/woob/modules/3.6/woob_modules/hsbc/browser.py", line 338, in iter_account_owners
self.go_post(self.js_url, data={'debr': 'COMPTES_PAN'})
^^^^^^^^^^^
AttributeError: 'HSBC' object has no attribute 'js_url'
What are the steps to reproduce the problem?
- Add the backend
- Configure it
- List
What woob version are you using?
Output of woob config --version
command:
Woob config v3.6 Copyright(C) 2010-2023 Christophe Benz, Romain Bignon
What module version are you using?
Output of woob config info MODULE_NAME
command:
.------------------------------------------------------------------------------.
| Module hsbc |
+-----------------.------------------------------------------------------------'
| Version | 202310191405
| Maintainer | Romain Bignon <romain@weboob.org>
| License | LGPLv3+
| Description | HSBC France
| Capabilities | CapBankWealth, CapBank, CapCollection, CapDocument, CapProfile, CapCredentialsCheck
| Installed | yes
| Location | https://updates.woob.tech/3/main/hsbc.tar.gz
| |
| Configuration | login: Identifiant (default: )
| | password: Mot de passe (default: )
| | secret: Réponse secrète (default: )
'-----------------'
How did you install woob?
By using pipx
Edited by Adrian Maurin