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
ttributeError: type object 'dict' has no attribute 'from_dict'
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
File <command-85549842133900>, line 1
----> 1 wc.workspace_conf.get_status(keys="enableDeprecatedClusterNamedInitScripts")
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-31d522b2-5781-46e3-8fbb-a8f7361afd1d/lib/python3.10/site-packages/databricks/sdk/service/settings.py:1691, in WorkspaceConfAPI.get_status(self, keys)
1689 headers = {'Accept': 'application/json', }
1690 res = self._api.do('GET', '/api/2.0/workspace-conf', query=query, headers=headers)
-> 1691 return WorkspaceConf.from_dict(res)
File /usr/lib/python3.10/typing.py:983, in _BaseGenericAlias.__getattr__(self, attr)
980 # We are careful for copy and pickle.
981 # Also for simplicity we don't relay any dunder names
982 if '__origin__' in self.__dict__ and not _is_dunder(attr):
--> 983 return getattr(self.__origin__, attr)
984 raise AttributeError(attr)
Expected behavior
A clear and concise description of what you expected to happen.
Is it a regression?
Did this work in a previous version of the SDK? If so, which versions did you try?
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.
Thanks for this @alexott. This duplicates #128, so I'll close this issue out for now. You can follow that one for tracking/to provide further feedback.
## Changes
WorkspaceConf's APIs are unique in Databricks as they are the only
methods that accept a map for the request body (all other methods with
request bodies require a struct). This is incompatible with the Python
SDK, which generally has all fields of the request as method parameters.
This PR changes the behavior of methods that get and return maps. On the
set pathway, autogenerated code will include a field `contents` with a
map type corresponding to the type of the request body. This parameter
will be passed directly into the `do()` method of `ApiClient`. On the
get pathway, we'll return the deserialized response directly (which is
already a dictionary), rather than calling an imaginary
`WorkspaceConf.from_dict()` method.
Closes#500 and #128. Relates to #458, #455, #345, #211, and #167.
## Tests
New integration test for workspace conf passes.
Description
workspace_conf.get_status
fails with errorReproduction
In a notebook, with DBR 14.0 ML run
it fails with following error:
Expected behavior
A clear and concise description of what you expected to happen.
Is it a regression?
Did this work in a previous version of the SDK? If so, which versions did you try?
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.I see that REST API call is done correctly:
Other Information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: