Replies: 2 comments
-
|
Has anyone come up with a solution to this error? i have been struggling with this for close to a month with no resolution? |
Beta Was this translation helpful? Give feedback.
-
|
This looks like a library mix-up rather than a Projects-API problem. Your imports pull from two unrelated packages:
Using from xero_python.api_client import ApiClient
from xero_python.api_client.configuration import Configuration
from xero_python.api_client.oauth2 import OAuth2Token
from xero_python.project import ProjectApi
api_client = ApiClient(
Configuration(oauth2_token=OAuth2Token(client_id=CLIENT_ID, client_secret=CLIENT_SECRET)),
)
@api_client.oauth2_token_getter
def get_token():
return stored_token # your saved OAuth2 token dict
project_api = ProjectApi(api_client)
projects = project_api.get_projects(xero_tenant_id=tenant_id)Drop the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Am Trying to use the projects API. Getting this error:
AttributeError: 'NoneType' object has no attribute 'get_auth_settings'I think this might be a more general issue, not specific to projects.
However, I can't identify the issue.
What I've Tried:
Error:
Beta Was this translation helpful? Give feedback.
All reactions