Skip to content
Commit 91f5e1d4 authored by Romain Bignon's avatar Romain Bignon
Browse files

use ValueTransient in modules

parent 11e0a2ea
Pipeline #278637508 passed with warnings with stages
in 13 minutes and 35 seconds
  • Woob Import @woob-import

    mentioned in issue #349 (closed)

    By Romain Bignon on 2020-02-11T23:10:45 (imported from GitLab)

    ·

    mentioned in issue #349 (closed)

    By Romain Bignon on 2020-02-11T23:10:45 (imported from GitLab)

    Toggle commit list
  • I have a new error with creditmutuel/module.py : Error(cic): Backend(cic): Configuration error for field "code": Value "None" does not match regexp "^\d{6}$"

    If I remove the ", regexp=r'^\d{6}$'" it works

    By Ghost User on 2020-02-12T11:19:58 (imported from GitLab)

  • Hm, do you have the full log? I can't reproduce it.

    By Romain Bignon on 2020-02-12T12:08:18 (imported from GitLab)

  • On a new installation, the configuration file weboob/backends don't have code value

    [cic]
    _module = cic
    login = XXXXXXXXXXX
    password = YYYYYY

    If I add manually, it works :

    [cic]
    _module = cic
    login = XXXXXXXXXXX
    password = YYYYYY
    code = YYYYYY

    during the configuration of module, "code" it's not asked

    By Ghost User on 2020-02-12T12:18:35 (imported from GitLab)

    Edited by Woob Import
  • When I define a backend cic with these settings:

    $ boobank -b cic list   
                                    Account                     Balance    Coming 
    ---------------------------------------------------------+----------+----------
    Bug(cic): 'LoginPage' object has no attribute 'iter_accounts'
    Use --debug option to print backtraces
    ---------------------------------------------------------+----------+----------

    But as I don't have a CIC account the credentials are invalid.

    Can you run boobank with -a and paste the output?

    By Romain Bignon on 2020-02-12T12:21:37 (imported from GitLab)

  • ~/weboob/bin$ ./boobank -a
    Debug data will be saved in this directory: /tmp/weboob_session_a2mps1f8
    2020-02-12 13:24:37,960:DEBUG:weboob.config:1.6:yamlconfig.py:69:load Loading configuration file: /home/user/.config/weboob/boobank.storage.
    2020-02-12 13:24:37,968:DEBUG:weboob.config:1.6:yamlconfig.py:73:load Configuration file loaded: /home/user/.config/weboob/boobank.storage.
    2020-02-12 13:24:37,969:DEBUG:modules:1.6:modules.py:166:load_module Loaded module "cic" from /home/user/.local/share/weboob/modules/1.6/cic
    2020-02-12 13:24:38,021:DEBUG:modules:1.6:modules.py:166:load_module Loaded module "creditmutuel" from /home/user/.local/share/weboob/modules/1.6/creditmutuel
    2020-02-12 13:24:38,022:INFO:root:1.6:base.py:270:load_backends No backend loaded
    Error(cic): Backend(cic): Configuration error for field "code": Value "None" does not match regexp "^\d{6}$"
    Do you want to reconfigure this backend? (Y/n): 

    By Ghost User on 2020-02-12T12:27:34 (imported from GitLab)

  • Are you really up-to-date of the weboob and module code?

    By Romain Bignon on 2020-02-12T12:28:19 (imported from GitLab)

  • Yes the last module and weboob version.

    cic use creditmutuel module. The configuration interface don't ask for "code" value and use a default value "None" when the module is loaded, "None" don't match with the regexp "^\d{6}$".

    Select a backend to create (q to stop): 26
    2020-02-12 13:29:30,777:DEBUG:modules:1.6:modules.py:166:load_module Loaded module "cic" from /home/user/.local/share/weboob/modules/1.6/cic
    Backend "cic" successfully added.
    2020-02-12 13:29:30,891:DEBUG:modules:1.6:modules.py:166:load_module Loaded module "creditmutuel" from /home/user/.local/share/weboob/modules/1.6/creditmutuel
    2020-02-12 13:29:30,892:INFO:root:1.6:base.py:270:load_backends No backend loaded
    Error(cic): Backend(cic): Configuration error: Missing parameter "login" (Identifiant)
    Do you want to reconfigure this backend? (Y/n): 
    
    Configuration of backend cic
    ----------------------------
    [login] Identifiant:
         c: Run an external tool during backend load
         p: Prompt value when needed (do not store it)
         s: Store value in config
    *** How do you want to store it? (c/P/s): s
    Identifiant: XXXXXXXXXX	
    [password] Mot de passe:
         c: Run an external tool during backend load
         p: Prompt value when needed (do not store it)
         s: Store value in config
    *** How do you want to store it? (c/P/s): s
    Mot de passe (hidden input): 
    ----------------------------
    Backend "cic" successfully edited.
    2020-02-12 13:29:59,885:INFO:root:1.6:base.py:270:load_backends No backend loaded
    Error(cic): Backend(cic): Configuration error for field "code": Value "None" does not match regexp "^\d{6}$"
    Do you want to reconfigure this backend? (Y/n):

    If I remove the regexp condition in creditmutuel/module.py or if I add a line with : code = 123456 (for example) It works very well

    By Ghost User on 2020-02-12T12:44:08 (imported from GitLab)

    Edited by Woob Import
  • Hm, when I do the same thing, it asks me resume, request_information and code during configuration of the backend.

    And another bug is that firstly le backend cic is added without configuration, and then tells there is a missing parameter. Perhaps because this is an abstract module of creditmutuel.

    By Romain Bignon on 2020-02-12T12:46:05 (imported from GitLab)

  • I tested with fake credit mutuel account and I have the same issue.

    Maybe the problem is with the compilation. I have an other problem with setup.py. It is the only difference what I see.

    https://git.weboob.org/weboob/weboob/commit/2c1e00abc8ccf4927a16a8d8c435c64f88b24714#note_4228

    For compiling I used the previous version of setup.py

    I think it's not a good solution but it work awaiting

    By Ghost User on 2020-02-12T13:02:10 (imported from GitLab)

  • You are right, there was a bug, and it was my installation which was broken :).

    I've pushed e00cc9b2 can you confirm it fixes the problem?

    By Romain Bignon on 2020-02-12T20:55:59 (imported from GitLab)

  • It asks me only login and password during configuration of the backend without any errors.

    For my information, what is resume, request_information and code ?

    By Ghost User on 2020-02-13T09:07:27 (imported from GitLab)

  • request_information is an internal key that is used to tell the module that the request to website is provoked by a user and not by an automatic call. It prevents performing two-factor authentications.

    resume is used when the 2FA is a mobile application confirmation, and code when it's an OTP sent by SMS.

    By Romain Bignon on 2020-02-13T09:11:18 (imported from GitLab)

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment