[Bug] ExpiredSessionException in edupage api
Closed this issue · 1 comments
Dominik26-1 commented
Hi,
after whole day running my web app server I got this error.
ExpiredSessionException at /search/
Invalid gsec hash! (Expired session, try logging in again!)
I am using edupage API package and I know that problem should be with expiration time of edupage login session.
But what is propriate fix for this error. Is there some property to set it or I have to ensure login again and used newly retrieved Edupage object.
And another question how long it takes to got this error?
I can not find this information in docs.
Thanks for advice.
BelKed commented
The session expiration time is either 12 or 24 hours.
You can add a try
except
block to your code:
try:
# Your code
except ExpiredSessionException:
edupage.login(…)