[bank][cmb] can't compare offset-naive and offset-aware datetimes
I get a reproduceable datetime comparison error on all bank operations with the cmb
module:
$ woob bank ls --debug
2021-09-28 09:50:57,053:DEBUG:woob.config:3.0:yamlconfig.py:75:load Loading configuration file: …/.config/woob/bank.storage.
2021-09-28 09:50:57,054:DEBUG:woob.config:3.0:yamlconfig.py:79:load Configuration file loaded: …/.config/woob/bank.storage.
2021-09-28 09:50:57,060:DEBUG:modules:3.0:modules.py:166:load_module Loaded module "cmb" from …/woob/modules/3.0/cmb
2021-09-28 09:50:57,111:DEBUG:modules:3.0:modules.py:166:load_module Loaded module "cmso" from …/woob/modules/3.0/cmso
2021-09-28 09:50:58,143:DEBUG:backend:3.0:modules.py:97:create_instance Created backend "cmb" for module "cmb"
2021-09-28 09:50:58,145:DEBUG:woob.config:3.0:iniconfig.py:53:load Loading application configuration file: …/.config/woob/bank.
2021-09-28 09:50:58,146:DEBUG:woob.config:3.0:iniconfig.py:73:load Application configuration file loaded: …/.config/woob/bank.
Account Balance Coming
---------------------------------------------------------+----------+----------
2021-09-28 09:50:58,162:DEBUG:bcall:3.0:bcall.py:92:backend_process <Backend 'cmb'>: Calling function <bound method Application._do_complete of <woob.applications.bank.bank.Appbank object at 0x7fc0c6308070>>
2021-09-28 09:50:58,163: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)
2021-09-28 09:50:58,164: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)
2021-09-28 09:50:58,166:DEBUG:bcall:3.0:bcall.py:98:backend_process <Backend 'cmb'>: Called function <bound method Application._do_complete of <woob.applications.bank.bank.Appbank object at 0x7fc0c6308070>> raised an error: TypeError("can't compare offset-naive and offset-aware datetimes")
Bug(cmb): can't compare offset-naive and offset-aware datetimes
(If --auto-update is passed on the command-line, new versions of the module will be checked automatically)
Traceback (most recent call last):
File "…/woob/core/bcall.py", line 94, in backend_process
result = function(backend, *args, **kwargs)
File "…/woob/tools/application/base.py", line 349, in _do_complete
res = getattr(backend, function)(*args, **kwargs)
File "…/woob/capabilities/bank/base.py", line 365, in iter_resources
return self.iter_accounts()
File "…/woob/modules/3.0/cmso/module.py", line 85, in iter_accounts
return self.browser.iter_accounts()
File "…/woob/tools/backend.py", line 349, in browser
self._browser = self.create_default_browser()
File "…/woob/modules/3.0/cmso/module.py", line 73, in create_default_browser
return self.create_browser(
File "…/woob/tools/backend.py", line 392, in create_browser
browser.load_state(self.storage.get('browser_state', default={}))
File "…/woob/modules/3.0/cmso/par/compat/woob_browser_browsers.py", line 245, in load_state
super(TwoFactorBrowser, self).load_state(state)
File "…/woob/browser/browsers.py", line 1059, in load_state
if state.get('expire') and parser.parse(state['expire']) < datetime.now():
TypeError: can't compare offset-naive and offset-aware datetimes
I have not tried other bank modules yet, but I suspect multiple other ones could be affected too.