I'm getting "DiskUnsupportedUserAccountTypeError" error.
yusufusta opened this issue · 6 comments
I dont know why i am getting this error. When i input code i am getting this error.
ERROR:telethon.client.updates:Unhandled exception on handler
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/telethon/client/updates.py", line 413, in _dispatch_update
await callback(event)
File "script.py", line 87, in handler
if y.check_token():
File "/usr/local/lib/python3.6/dist-packages/yadisk/yadisk.py", line 408, in check_token
return functions.check_token(self.get_session(token), **kwargs)
File "/usr/local/lib/python3.6/dist-packages/yadisk/functions/auth.py", line 27, in check_token
get_disk_info(session, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/yadisk/functions/disk.py", line 22, in get_disk_info
request.send()
File "/usr/local/lib/python3.6/dist-packages/yadisk/api/api_request.py", line 114, in send
auto_retry(self._attempt, self.n_retries, self.retry_interval)
File "/usr/local/lib/python3.6/dist-packages/yadisk/utils.py", line 84, in auto_retry
return func()
File "/usr/local/lib/python3.6/dist-packages/yadisk/api/api_request.py", line 105, in _attempt
raise get_exception(self.response)
yadisk.exceptions.ForbiddenError: Тип аккаунта пользователя не поддерживается. (User account type is not supported. / DiskUnsupportedUserAccountTypeError)
How did you receive the token? I suspect it has something to do with it.
`y = yadisk_async.YaDisk(yandex_app_id, yandex_app_secret)
url2 = y.get_code_url()
y.token = response.access_token
if await y.check_token():
await conv.send_message("Token başarılı bir şekilde kaydedildi!")
dosya = open(str(userid),"w",encoding="utf-8")
dosya.write(y.token)
else:
await conv.send_message("Something went wrong. Not sure how though...")`
Well, it seems that I can't help with anything here, I wasn't able to find any relevant information about this kind of error, the API docs don't seem to mention it anywhere, and I have no idea how to reproduce it. Maybe there is something wrong with the account after all.
I'm trying example codes in there but result is same. I changed api keys and result is same. I dont know i am getting this error. :(
Try another account, maybe. Assuming you've correctly specified the application ID and secret, it seems that the problem is not in your code (or at least that's what it looks like).
We are getting the same error.