[boobank][cragr] Bug(cragr): 'NotAvailableType' object has no attribute 'replace'
With which module do you encounter problems?
cragr
Describe the problem you encounter
module logs an error upon the list
command
Paste here the stacktrace or error message you observe
C:\> boobank --debug -b cragr
2020-12-17 17:33:23,016:DEBUG:weboob.config:2.1:yamlconfig.py:69:load Loading configuration file: C:\Users\Bruno\.config\weboob\boobank.storage.
2020-12-17 17:33:23,056:DEBUG:weboob.config:2.1:yamlconfig.py:73:load Configuration file loaded: C:\Users\Bruno\.config\weboob\boobank.storage.
2020-12-17 17:33:23,420:DEBUG:modules:2.1:modules.py:166:load_module Loaded module "cragr" from d:/Dropbox/Projets/boomoney/modules/cragr
2020-12-17 17:33:33,498:DEBUG:backend:2.1:modules.py:97:create_instance Created backend "cragr" for module "cragr"
2020-12-17 17:33:33,504:DEBUG:weboob.config:2.1:iniconfig.py:53:load Loading application configuration file: C:\Users\Bruno\.config\weboob\boobank.
2020-12-17 17:33:33,504:DEBUG:weboob.config:2.1:iniconfig.py:73:load Application configuration file loaded: C:\Users\Bruno\.config\weboob\boobank.
Welcome to boobank v2.1
Copyright(C) 2010-2020 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: cragr
boobank> list
Account Balance Coming
------------------------------------------+----------+----------
2020-12-17 17:33:37,946:DEBUG:bcall:2.1:bcall.py:92:backend_process <Backend 'cragr'>: Calling function <bound method Application._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x035E0B80>>
2020-12-17 17:33:37,948:DEBUG:urllib3.util.retry:2.1:retry.py:230:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2020-12-17 17:33:37,949:DEBUG:urllib3.util.retry:2.1:retry.py:230:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2020-12-17 17:33:38,043:DEBUG:modules:2.1:modules.py:166:load_module Loaded module "netfinca" from d:/Dropbox/Projets/boomoney/modules/netfinca
2020-12-17 17:33:38,044:DEBUG:urllib3.util.retry:2.1:retry.py:230:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2020-12-17 17:33:38,046:DEBUG:urllib3.util.retry:2.1:retry.py:230:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2020-12-17 17:33:38,051:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:937:_new_conn Starting new HTTPS connection (1): www.credit-agricole.fr:443
2020-12-17 17:33:38,485:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "GET /ca-pca/particulier/acceder-a-mes-comptes.html HTTP/1.1" 200 10104
2020-12-17 17:33:38,495:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/acceder-a-mes-comptes.html with LoginPage
2020-12-17 17:33:38,582:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "POST /ca-pca/particulier/acceder-a-mes-comptes.authenticationKeypad.json HTTP/1.1" 200 106
2020-12-17 17:33:38,588:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/acceder-a-mes-comptes.authenticationKeypad.json with KeypadPage
2020-12-17 17:33:38,672:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "GET /ca-pca/particulier/acceder-a-mes-comptes.html HTTP/1.1" 200 10104
2020-12-17 17:33:38,689:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/acceder-a-mes-comptes.html with LoginPage
2020-12-17 17:33:39,089:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "POST /ca-pca/particulier/acceder-a-mes-comptes.html/j_security_check HTTP/1.1" 200 74
2020-12-17 17:33:39,101:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/acceder-a-mes-comptes.html/j_security_check with SecurityPage
2020-12-17 17:33:39,759:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "GET /ca-pca/particulier/operations/synthese.html HTTP/1.1" 200 48956
2020-12-17 17:33:39,920:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/operations/synthese.html with AccountsPage
2020-12-17 17:33:39,920:DEBUG:bcall:2.1:bcall.py:101:backend_process <Backend 'cragr'>: Called function <bound method Application._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x035E0B80>> returned: <generator object Application._do_complete_iter at 0x03F3BDB8>
2020-12-17 17:33:40,423:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "GET /ca-pca/particulier/operations/synthese.html HTTP/1.1" 200 48341
2020-12-17 17:33:40,688:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/operations/synthese.html with AccountsPage
2020-12-17 17:33:40,692:INFO:backend.cragr.browser:2.1:browser.py:350:iter_spaces The total number of spaces on this connection is 1.
2020-12-17 17:33:41,181:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "GET /ca-pca/particulier/operations/synthese.html HTTP/1.1" 200 None
2020-12-17 17:33:41,367:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/operations/synthese.html with AccountsPage
2020-12-17 17:33:41,579:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "GET /ca-pca/particulier/operations/synthese/jcr:content.produits-valorisation.json/1 HTTP/1.1" 200 899
2020-12-17 17:33:41,582:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/operations/synthese/jcr:content.produits-valorisation.json/1 with AccountDetailsPage
2020-12-17 17:33:41,778:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "GET /ca-pca/particulier/operations/synthese/jcr:content.produits-valorisation.json/3 HTTP/1.1" 200 1889
2020-12-17 17:33:41,781:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/operations/synthese/jcr:content.produits-valorisation.json/3 with AccountDetailsPage
2020-12-17 17:33:41,990:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "GET /ca-pca/particulier/operations/synthese/jcr:content.produits-valorisation.json/7 HTTP/1.1" 200 676
2020-12-17 17:33:41,993:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/operations/synthese/jcr:content.produits-valorisation.json/7 with AccountDetailsPage
2020-12-17 17:33:42,099:DEBUG:urllib3.connectionpool:2.1:connectionpool.py:433:_make_request https://www.credit-agricole.fr:443 "GET /ca-pca/particulier/operations/operations-courantes/editer-rib/jcr:content.ibaninformation.json?compteIdx=0&grandeFamilleCode=1 HTTP/1.1" 200 329
2020-12-17 17:33:42,104:DEBUG:backend.cragr.browser:2.1:browsers.py:884:internal_callback Handle https://www.credit-agricole.fr/ca-pca/particulier/operations/operations-courantes/editer-rib/jcr:content.ibaninformation.json?compteIdx=0&grandeFamilleCode=1 with IbanPage
Bug(cragr): 'NotAvailableType' object has no attribute 'replace'
Traceback (most recent call last):
File "C:\Users\Bruno\AppData\Roaming\Python\Python38\site-packages\weboob-2.1-py3.8.egg\weboob\core\bcall.py", line 106, in backend_process
for subresult in result:
File "C:\Users\Bruno\AppData\Roaming\Python\Python38\site-packages\weboob-2.1-py3.8.egg\weboob\tools\application\base.py", line 297, in _do_complete_iter
for i, sub in enumerate(res):
File "d:/Dropbox/Projets/boomoney/modules/cragr\browser.py", line 423, in iter_accounts
main_account.iban = self.get_account_iban(main_account._index, 1, main_account.id)
File "d:/Dropbox/Projets/boomoney/modules/cragr\browser.py", line 327, in get_account_iban
if is_iban_valid(iban):
File "C:\Users\Bruno\AppData\Roaming\Python\Python38\site-packages\weboob-2.1-py3.8.egg\weboob\tools\capabilities\bank\iban.py", line 42, in is_iban_valid
iban = clean(iban)
File "C:\Users\Bruno\AppData\Roaming\Python\Python38\site-packages\weboob-2.1-py3.8.egg\weboob\tools\capabilities\bank\iban.py", line 38, in clean
return iban.replace(' ','').replace('\t', '')
AttributeError: 'NotAvailableType' object has no attribute 'replace'
------------------------------------------+----------+----------
boobank>
What are the steps to reproduce the problem?
Just launch boobank with the cragr module and issue the list command
What weboob version are you using?
Output of weboob-config --version
command:
weboob-config v2.1 Copyright(C) 2010-2020 Christophe Benz, Romain Bignon
What module version are you using?
Output of weboob-config info MODULE_NAME
command:
.------------------------------------------------------------------------------.
| Module cragr |
+-----------------.------------------------------------------------------------'
| Version | 202011212142
| Maintainer | Quentin Defenouillère <quentin.defenouillere@budget-insight.com>
| License | LGPLv3+
| Description | Crédit Agricole
| Capabilities | CapProfile, CapBankTransferAddRecipient, CapBankTransfer, CapBankWealth, CapBank, CapCollection, CapTransfer
| Installed | yes
| Location | d:/Dropbox/Projets/boomoney/modules/cragr
| |
| Configuration | website: Caisse Régionale
| | login: Identifiant à 11 chiffres (default: )
| | password: Code personnel à 6 chiffres (default: )
'-----------------'
How did you install weboob?
git clone install on Windows
Additional info you'd like to mention
It seems that removing commit 079fbcec [cragr] Fix: retrieve IBAN fixes the problem
Edited by Woob Import