You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently running the master branch in order to test the PR#2540 locally, and I'm getting an exception due to expired token when it's definitely not.
Here is the context and what I do to reproduce:
I have a Github application bot that I connect to using the following code:
When I try to get a repository with rest_github.get_repo(repository_name) it works the first time.
But if I run the same function again, I will get the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/miniconda3/envs/my_env/lib/python3.11/site-packages/github/MainClass.py", line 360, in get_repo
headers, data = self.__requester.requestJsonAndCheck("GET", url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/my_env/lib/python3.11/site-packages/github/Requester.py", line 431, in requestJsonAndCheck
*self.requestJson(
^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/my_env/lib/python3.11/site-packages/github/Requester.py", line 568, in requestJson
return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/my_env/lib/python3.11/site-packages/github/Requester.py", line 661, in __requestEncode
] = f"{self.__auth.token_type} {self.__auth.token}"
^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/my_env/lib/python3.11/site-packages/github/Auth.py", line 299, in token
if self.__installation_authorization is None or self._is_expired:
^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/my_env/lib/python3.11/site-packages/github/Auth.py", line 310, in _is_expired
return token_expires_at < datetime.now(timezone.utc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: can't compare offset-naive and offset-aware datetimes
I have set the jwt_expiry value to 600s, but it doesn't take it into consideration.
Would anyone have a suggestion ?
The text was updated successfully, but these errors were encountered:
I'm currently running the master branch in order to test the PR#2540 locally, and I'm getting an exception due to expired token when it's definitely not.
Here is the context and what I do to reproduce:
rest_github.get_repo(repository_name)
it works the first time.I have set the jwt_expiry value to 600s, but it doesn't take it into consideration.
Would anyone have a suggestion ?
The text was updated successfully, but these errors were encountered: