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

get_token() raise exception #169

Open
Ashitaka57 opened this issue Dec 3, 2022 · 2 comments
Open

get_token() raise exception #169

Ashitaka57 opened this issue Dec 3, 2022 · 2 comments

Comments

@Ashitaka57
Copy link

Ashitaka57 commented Dec 3, 2022

Hello, recently I have this kind of errors. The API is unusable. I can't pinpoint where the problem lies. Did Surepetcare.io change anything on their side which need adaptation here?

🐾 · GET app.api.surehub.io/api/me/start: 401 | <ClientResponse(https://app.api.surehub.io/api/me/start) [401 Unauthorized]> <CIMultiDictProxy('Date': 'Sat, 03 Dec 2022 17:37:22 GMT', 'Content-Type': 'application/json', 'Content-Length': '63', 'Connection': 'keep-alive', 'Server': 'nginx', 'Cache-Control': 'no-cache, private', 'Access-Control-Allow-Origin': 'https://surepetcare.io', 'Vary': 'Origin', 'Content-Encoding': 'gzip', 'Strict-Transport-Security': 'max-age=31536000; includeSubdomains; preload', 'X-Frame-Options': 'SAMEORIGIN', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block')>

Traceback (most recent call last): if response := await self.sac.call(method="GET", resource=MESTART_RESOURCE): File "/surepy/client.py", line 266, in call await self.call(method="GET", resource=resource, second_try=True) File "/surepy/client.py", line 217, in call self._auth_token = await self.get_token() File "/surepy/client.py", line 187, in get_token raise SurePetcareError()

seems some other users encounter the same problems.
benleb/sureha#35

@djvanhelmond
Copy link

djvanhelmond commented Dec 14, 2023

Same error here:

File "/opt/homebrew/lib/python3.11/site-packages/surepy/__init__.py", line 320, in get_devices
for device in (await self.get_entities()).values()
               ^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/surepy/__init__.py", line 358, in get_entities
  if response := await self.sac.call(method="GET", resource=MESTART_RESOURCE):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/surepy/client.py", line 218, in call
  self._auth_token = await self.get_token()
                     ^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/surepy/client.py", line 188, in get_token
  raise SurePetcareError()
surepy.exceptions.SurePetcareError

Problem started Dec 12th, around 11AM UTC.

@djvanhelmond
Copy link

This is actually the same issue as described here in #199 (HTTP 415).
This is a duplicate.

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