Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
weboob
weboob
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 184
    • Issues 184
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 50
    • Merge Requests 50
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards

The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

  • weboob
  • weboobweboob
  • Issues
  • #472

Closed
Open
Opened Mar 31, 2021 by Roland Mas@lolando
  • Report abuse
  • New issue
Report abuse New issue

[amelipro] AttributeError: 'NoneType' object has no attribute 'login'

With which module do you encounter problems?

amelipro

Describe the problem you encounter

Can't seem to login, and so it can't list (or download) documents or bills.

Paste here the stacktrace or error message you observe

$ boobill -b amelipro
2021-03-31 17:02:57,398:WARNING:weboob:2.0:ouiboube.py:469:load_backends Backend "edf" is referenced in /home/blagandzig/.config/weboob/backends but was not found. Perhaps a missing repository or a removed module?
Unable to load formatter "table": No module named 'prettytable'
Falling back to "multiline".
Welcome to boobill v2.0

Copyright(C) 2012-2021 Florent Fourcot
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: amelipro

boobill> logging debug
boobill> bills
2021-03-31 17:03:04,785:DEBUG:bcall:2.0:bcall.py:92:backend_process <Backend 'amelipro'>: Calling function <bound method Application._do_complete of <weboob.applications.boobill.boobill.Boobill object at 0x7fa4d6fe00f0>>
2021-03-31 17:03:04,786:DEBUG:urllib3.util.retry:2.0:retry.py:333:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2021-03-31 17:03:04,786:DEBUG:urllib3.util.retry:2.0:retry.py:333:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2021-03-31 17:03:04,787:DEBUG:backend.amelipro.browser:2.0:browser.py:57:do_login call Browser.do_login
2021-03-31 17:03:04,789:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:975:_new_conn Starting new HTTPS connection (1): espacepro.ameli.fr:443
2021-03-31 17:03:05,055:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:461:_make_request https://espacepro.ameli.fr:443 "GET /PortailPS/appmanager/portailps/professionnelsante?_nfpb=true&_pageLabel=vp_login_page HTTP/1.1" 302 0
2021-03-31 17:03:05,097:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:461:_make_request https://espacepro.ameli.fr:443 "GET /PortailPS/OIDC HTTP/1.1" 302 482
2021-03-31 17:03:05,100:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:975:_new_conn Starting new HTTPS connection (1): authps-espacepro.ameli.fr:443
2021-03-31 17:03:05,360:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:461:_make_request https://authps-espacepro.ameli.fr:443 "GET /oauth2/authorize?response_type=code&scope=openid%20profile%20infosps%20email&client_id=csm-cen-prod_ameliprotransverse-connexionadmin_1_amtrx_i1_csm-cen-prod%2Fameliprotransverse-connexionadmin_1%2Famtrx_i1&state=j793EKSrHnPlE58EBxq3XpCOoxk&redirect_uri=https%3A%2F%2Fespacepro.ameli.fr%2Fredirect_uri&nonce=_aWhNg1riNXDUnnXZkLCCHn8IBAOvsD4lZFDcnvFMtk HTTP/1.1" 200 None
2021-03-31 17:03:05,366:DEBUG:backend.amelipro.browser:2.0:browsers.py:734:internal_callback Unable to handle https://authps-espacepro.ameli.fr/oauth2/authorize?response_type=code&scope=openid%20profile%20infosps%20email&client_id=csm-cen-prod_ameliprotransverse-connexionadmin_1_amtrx_i1_csm-cen-prod%2Fameliprotransverse-connexionadmin_1%2Famtrx_i1&state=j793EKSrHnPlE58EBxq3XpCOoxk&redirect_uri=https%3A%2F%2Fespacepro.ameli.fr%2Fredirect_uri&nonce=_aWhNg1riNXDUnnXZkLCCHn8IBAOvsD4lZFDcnvFMtk
2021-03-31 17:03:05,366:DEBUG:bcall:2.0:bcall.py:98:backend_process <Backend 'amelipro'>: Called function <bound method Application._do_complete of <weboob.applications.boobill.boobill.Boobill object at 0x7fa4d6fe00f0>> raised an error: AttributeError("'NoneType' object has no attribute 'login'")
Bug(amelipro): 'NoneType' object has no attribute 'login'
(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/blagandzig/.local/venvs/weboob/lib/python3.7/site-packages/weboob/core/bcall.py", line 94, in backend_process
    result = function(backend, *args, **kwargs)
  File "/home/blagandzig/.local/venvs/weboob/lib/python3.7/site-packages/weboob/tools/application/base.py", line 318, in _do_complete
    res = getattr(backend, function)(*args, **kwargs)
  File "/home/blagandzig/.local/share/weboob/modules/2.0/amelipro/module.py", line 54, in iter_subscription
    return self.browser.get_subscription_list()
  File "/home/blagandzig/.local/venvs/weboob/lib/python3.7/site-packages/weboob/browser/browsers.py", line 821, in inner
    browser.do_login()
  File "/home/blagandzig/.local/share/weboob/modules/2.0/amelipro/browser.py", line 66, in do_login
    self.page.login(self.username, self.password)
AttributeError: 'NoneType' object has no attribute 'login'

boobill> documents 
2021-03-31 17:03:08,353:DEBUG:bcall:2.0:bcall.py:92:backend_process <Backend 'amelipro'>: Calling function <bound method Application._do_complete of <weboob.applications.boobill.boobill.Boobill object at 0x7fa4d6fe00f0>>
2021-03-31 17:03:08,354:DEBUG:backend.amelipro.browser:2.0:browser.py:57:do_login call Browser.do_login
2021-03-31 17:03:08,373:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:461:_make_request https://espacepro.ameli.fr:443 "GET /PortailPS/appmanager/portailps/professionnelsante?_nfpb=true&_pageLabel=vp_login_page HTTP/1.1" 302 0
2021-03-31 17:03:08,402:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:461:_make_request https://espacepro.ameli.fr:443 "GET /PortailPS/OIDC HTTP/1.1" 302 482
2021-03-31 17:03:08,471:DEBUG:urllib3.connectionpool:2.0:connectionpool.py:461:_make_request https://authps-espacepro.ameli.fr:443 "GET /oauth2/authorize?response_type=code&scope=openid%20profile%20infosps%20email&client_id=csm-cen-prod_ameliprotransverse-connexionadmin_1_amtrx_i1_csm-cen-prod%2Fameliprotransverse-connexionadmin_1%2Famtrx_i1&state=0ZSPhqNmm0rEF4J7VWJLSaLxx04&redirect_uri=https%3A%2F%2Fespacepro.ameli.fr%2Fredirect_uri&nonce=BxkHgtmZ6sDzgqo7JUArsPLMSZcS_K_yl7uq2FEVZ3M HTTP/1.1" 200 None
2021-03-31 17:03:08,474:DEBUG:backend.amelipro.browser:2.0:browsers.py:734:internal_callback Unable to handle https://authps-espacepro.ameli.fr/oauth2/authorize?response_type=code&scope=openid%20profile%20infosps%20email&client_id=csm-cen-prod_ameliprotransverse-connexionadmin_1_amtrx_i1_csm-cen-prod%2Fameliprotransverse-connexionadmin_1%2Famtrx_i1&state=0ZSPhqNmm0rEF4J7VWJLSaLxx04&redirect_uri=https%3A%2F%2Fespacepro.ameli.fr%2Fredirect_uri&nonce=BxkHgtmZ6sDzgqo7JUArsPLMSZcS_K_yl7uq2FEVZ3M
2021-03-31 17:03:08,474:DEBUG:bcall:2.0:bcall.py:98:backend_process <Backend 'amelipro'>: Called function <bound method Application._do_complete of <weboob.applications.boobill.boobill.Boobill object at 0x7fa4d6fe00f0>> raised an error: AttributeError("'NoneType' object has no attribute 'login'")
Bug(amelipro): 'NoneType' object has no attribute 'login'
(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/blagandzig/.local/venvs/weboob/lib/python3.7/site-packages/weboob/core/bcall.py", line 94, in backend_process
    result = function(backend, *args, **kwargs)
  File "/home/blagandzig/.local/venvs/weboob/lib/python3.7/site-packages/weboob/tools/application/base.py", line 318, in _do_complete
    res = getattr(backend, function)(*args, **kwargs)
  File "/home/blagandzig/.local/share/weboob/modules/2.0/amelipro/module.py", line 54, in iter_subscription
    return self.browser.get_subscription_list()
  File "/home/blagandzig/.local/venvs/weboob/lib/python3.7/site-packages/weboob/browser/browsers.py", line 821, in inner
    browser.do_login()
  File "/home/blagandzig/.local/share/weboob/modules/2.0/amelipro/browser.py", line 66, in do_login
    self.page.login(self.username, self.password)
AttributeError: 'NoneType' object has no attribute 'login'

boobill> 

What are the steps to reproduce the problem?

See above.

What weboob version are you using?

weboob-config v2.0 Copyright(C) 2010-2021 Christophe Benz, Romain Bignon

What module version are you using?

.------------------------------------------------------------------------------.
| Module amelipro                                                              |
+-----------------.------------------------------------------------------------'
| Version         | 202103171007
| Maintainer      | Christophe Lampin <weboob@lampin.net>
| License         | LGPLv3+
| Description     | Ameli website: French Health Insurance for Professionals
| Capabilities    | CapDocument, CapCollection
| Installed       | yes
| Location        | https://updates.weboob.org/2.0/main/amelipro.tar.gz
|                 | 
| Configuration   | login: E-mail, N° d'Assurance Maladie ou N° FINESS (default: )
|                 | password: Mot de passe (default: )
'-----------------'

How did you install weboob?

With the following script that I run from time to time to upgrade weboob:

p="$HOME/.local/venvs"
mkdir -p "$p"
cd "$p"
d=$(date +%Y-%m-%d)
tar caf "weboob-$d.tar.xz" weboob
rm -rf weboob
python3 /usr/bin/virtualenv --python=python3 "$p/weboob"
. "$p/weboob/bin/activate"
python3 $p/weboob/bin/pip -vv install git+https://git.weboob.org/weboob/devel.git@stable
python3 $p/weboob/bin/pip -vv install pdfminer.six
weboob-config update

Additional info you'd like to mention

I can't provide credentials for obvious reasons, but I'd be happy to help debugging.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
bill
Assign labels
  • View project labels
Reference: weboob/weboob#472