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

Error after some period using QR or token login #309

Open
bdbogjoe opened this issue Sep 19, 2024 · 1 comment
Open

Error after some period using QR or token login #309

bdbogjoe opened this issue Sep 19, 2024 · 1 comment

Comments

@bdbogjoe
Copy link

bdbogjoe commented Sep 19, 2024

i update to 2.14.1, issue with QR login is fixed, but i'm still having the issue of expiration after few hours (last time 6h)

2024-09-19 17:20:19,026 - pronote-rest - ERROR - Unknown error from pronote: 8 | La page a expiré ! (1)
2024-09-19 17:20:19,026 - pronote-rest - ERROR - Unknown error from pronote: 8 | La page a expiré ! (1)
Traceback (most recent call last):
  File "/home/app/.local/lib/python3.10/site-packages/pronotepy/clients.py", line 1061, in post
    return self.communication.post(function_name, post_data)
  File "/home/app/.local/lib/python3.10/site-packages/pronotepy/pronoteAPI.py", line 179, in post
    raise PronoteAPIError(
pronotepy.exceptions.PronoteAPIError: Unknown error from pronote: 8 | La page a expiré ! (1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/app/.local/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/app/.local/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "/home/app/app.py", line 312, in data_period
    tmp = getattr(p, type)
  File "/home/app/.local/lib/python3.10/site-packages/pronotepy/dataClasses.py", line 528, in grades
    response = self._client.post("DernieresNotes", 198, json_data)
  File "/home/app/.local/lib/python3.10/site-packages/pronotepy/clients.py", line 1070, in post
    return self.communication.post(function_name, post_data)
  File "/home/app/.local/lib/python3.10/site-packages/pronotepy/pronoteAPI.py", line 179, in post
    raise PronoteAPIError(
pronotepy.exceptions.PronoteAPIError: Unknown error from pronote: 8 | La page a expiré ! (1)

To try to fix this, i added cron every minute to refresh session using client.session_check() but did not solve. Still having this page expired :(

@bdbogjoe bdbogjoe changed the title Error after some period using QR&token login Error after some period using QR or token login Sep 19, 2024
@SleepInfinity
Copy link

I'm having the same issue even when i'm sending requests to pronote every 5 minutes to check for new homework or grades.
i don't know what is the problem.

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