Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible de se connecter avec la version 2.13.1 : Connection failure #306

Closed
ioull opened this issue Sep 11, 2024 · 2 comments
Closed

Comments

@ioull
Copy link

ioull commented Sep 11, 2024

Voici mon code de test qui fonctionne avec la version 2.13.0 :

import pronotepy
from pronotepy.ent import occitanie_toulouse_edu

client = pronotepy.ParentClient('https://0312744p.index-education.net/pronote/parent.html',
                          username='xxxxxxx',
                          password='xxxxxxx',
                          ent=occitanie_toulouse_edu)

if client.logged_in: # check if client successfully logged in
    # get the all the periods (may return multiple types like trimesters and semesters but it doesn't really matter
    # the api will get it anyway)
    periods = client.periods

    for period in periods:
        for grade in period.grades:  # iterate over all the grades
            print(f'{grade.grade}/{grade.out_of}')  # print out the grade in this style: 20/20

Apres upgrade en 2.13.1 (commande pip install pronotepy==2.13.1) j'ai l'erreur suivante:

Traceback (most recent call last):                                                                                                         
  File "/services/pronote2rest/dev/test.py", line 4, in <module>                                                                           
    client = pronotepy.ParentClient('https://0312744p.index-education.net/pronote/parent.html',                                            
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                            
  File "/services/pronote2rest/dev/myvenv2/lib/python3.11/site-packages/pronotepy/clients.py", line 795, in __init__                       
    super().__init__(pronote_url, username, password, ent, mode, uuid)                                                                     
  File "/services/pronote2rest/dev/myvenv2/lib/python3.11/site-packages/pronotepy/clients.py", line 433, in __init__                       
    super().__init__(pronote_url, username, password, ent, mode, uuid)                                                                     
  File "/services/pronote2rest/dev/myvenv2/lib/python3.11/site-packages/pronotepy/clients.py", line 83, in __init__                        
    cookies = ent(username, password, pronote_url=pronote_url)                                                                             
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                             
  File "/services/pronote2rest/dev/myvenv2/lib/python3.11/site-packages/pronotepy/ent/generic_func.py", line 134, in _cas_edu              
    raise ENTLoginError("Connection failure")                                                                                              
pronotepy.exceptions.ENTLoginError: Connection failure                                                                                     

Si je revert en 2.13.0 ca se remet à fonctionner

@bain3 bain3 closed this as completed in d48eb91 Sep 11, 2024
@bain3
Copy link
Owner

bain3 commented Sep 11, 2024

Hi, please try on the latest version.

pip install -U git+https://github.com/bain3/pronotepy

Also, consider using the QR code method to log in. It should be more stable.

@ioull
Copy link
Author

ioull commented Sep 11, 2024

Perfect ! it works !
thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants