Hi, someone who was really into your application asked me to debug this for him. I wanted to redirect this to you for people who weren't tech-savvy but really wanted to use your application. Just in case.
Your github documentation cover:
import sys
import asyncio
from aiohttp import ClientSession // also needs to import ClientResponseError
from xbox.webapi.api.client import XboxLiveClient
from xbox.webapi.authentication.manager import AuthenticationManager
from xbox.webapi.authentication.models import OAuth2TokenResponse
from xbox.webapi.common.exceptions import AuthenticationException
from xbox import *
client_id = 'YOUR CLIENT ID HERE'
client_secret = 'YOUR CLIENT SECRET HERE'
...
try:
await auth_mgr.refresh_tokens()
except ClientResponseError:
print("Could not refresh tokens")
sys.exit(-1)
...
def main()
asyncio.run(async_main())
Lastly, we tried to run your main file but it fails the run method:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "<input>", line 78, in main
File "C:\Users\...\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\...\base_events.py", line 642, in run_until_complete
return future.result()
File "<input>", line 28, in async_main
TypeError: __init__() takes 1 positional argument but 5 were given
I see your AuthenticationManager doesn't have an init accepting arguments but your documentation says it does.
Github main example
async def async_main():
tokens_file = "./token.json" # replace with path in auth scrip or just paste file with tokens here
async with ClientSession() as session:
auth_mgr = AuthenticationManager(
session, client_id, client_secret, ""
)
manager.py: AuthenticationManager(object) class
def __init__(self):
"""
Initialize an instance of :class:`AuthenticationManager`
"""
self.session = requests.session()
self.email_address = None
....
Hi, someone who was really into your application asked me to debug this for him. I wanted to redirect this to you for people who weren't tech-savvy but really wanted to use your application. Just in case.
Your github documentation cover:
Lastly, we tried to run your main file but it fails the run method:
I see your AuthenticationManager doesn't have an init accepting arguments but your documentation says it does.
Github main example
manager.py: AuthenticationManager(object) class
Any advice would be nice. Thank you.