isFakeAccount / psnawp

PlayStation Network API Python
https://pypi.org/project/PSNAWP/
Other
108 stars 23 forks source link

`get_groups` not working #64

Open swimmwatch opened 6 months ago

swimmwatch commented 6 months ago

Hello! I have tried to run get_groups method but it doesn't work:

from psnawp_api import PSNAWP

psnawp = PSNAWP('...')

client = psnawp.me()
groups = client.get_groups()
for group in groups:
    print(group)

Exception traceback:

Traceback (most recent call last):
  File "/home/swimmwatch/Desktop/learn/psn-bot/main.py", line 15, in <module>
    groups = client.get_groups()
             ^^^^^^^^^^^^^^^^^^^
  File "/home/swimmwatch/.cache/pypoetry/virtualenvs/psn-bot-tWdK-Kv6-py3.11/lib/python3.11/site-packages/psnawp_api/models/client.py", line 218, in get_groups
    response = self._request_builder.get(url=f"{BASE_PATH['gaming_lounge']}{API_PATH['my_groups']}", params=param).json()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/swimmwatch/.cache/pypoetry/virtualenvs/psn-bot-tWdK-Kv6-py3.11/lib/python3.11/site-packages/psnawp_api/utils/request_builder.py", line 79, in get
    response_checker(response)
  File "/home/swimmwatch/.cache/pypoetry/virtualenvs/psn-bot-tWdK-Kv6-py3.11/lib/python3.11/site-packages/psnawp_api/utils/request_builder.py", line 31, in response_checker
    raise PSNAWPForbidden(response.text)
psnawp_api.core.psnawp_exceptions.PSNAWPForbidden: {"error":{"referenceId":"fee7ed74-ef3d-11ee-8793-09bda2ebb9bf","code":2286097,"message":"Not permitted by parental control"}}

Can you please tell me what the problem might be?

I have created the new account for testing this Python package. This account doesn't have parental control.

isFakeAccount commented 4 months ago

No idea what the problem could be. I suggest signing in on PlayStation with this account if you haven't already. It might fix this issue.

swimmwatch commented 4 months ago

Yes, I'm logged in to receive a npsso.

isFakeAccount commented 4 months ago

Yes, I'm logged in to receive a npsso.

I mean the PlayStation console. Not the website.