You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The return type of the method w.token_management.list() is Iterator[[TokenInfo] as per the documentation. However the return type becomes Iterator[[PublicTokenInfo] when I run my code via a databricks job that is attatched to a job cluster.
The same code is working fine on a different cluster. both of these clusters have the same databricks-sdk version 0.10.0 and the same configuration.
Reproduction
pats = self.workspace_client.token_management.list()
for pat in pats:
if str(pat.owner_id) == service_principal.id:
return True, pat
Expected behavior
The above code should not give the above error attatched in the screenshot no matter which cluster I run from
Is it a regression?
tried in the latest version as well. Got the same error.
Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to debug by adding logging.basicConfig(level=logging.DEBUG) to your program, and include the logs here. log4j-active.txt stderr.txt stdout.txt
FYI the JSON value when hitting the endpoint is same in both the clusters. Is there a way to return only the json object?
The text was updated successfully, but these errors were encountered:
abhinav-as
changed the title
AttributeError: 'PublicTokenInfo' object has no attribute 'owner_id'
[ISSUE]AttributeError: 'PublicTokenInfo' object has no attribute 'owner_id'
Dec 23, 2024
Description
The return type of the method
w.token_management.list()
isIterator[[TokenInfo]
as per the documentation. However the return type becomesIterator[[PublicTokenInfo]
when I run my code via a databricks job that is attatched to a job cluster.The same code is working fine on a different cluster. both of these clusters have the same databricks-sdk version 0.10.0 and the same configuration.
Reproduction
Expected behavior
The above code should not give the above error attatched in the screenshot no matter which cluster I run from
Is it a regression?
tried in the latest version as well. Got the same error.
Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to debug by adding
logging.basicConfig(level=logging.DEBUG)
to your program, and include the logs here.log4j-active.txt
stderr.txt
stdout.txt
Other Information
Additional context
The text was updated successfully, but these errors were encountered: