______________________ ERROR at setup of test_perf[[dataset:adult_uci,predictor:rbm_svm,mitigator:ThresholdOptimizer,disparity_metric:equalized_odds]] ______________________
self = <msrestazure.azure_active_directory.AdalAuthentication object at 0x7fd9e7c793a0>, session = <requests.sessions.Session object at 0x7fd9e7c791c0>
def signed_session(self, session=None):
"""Create requests session with any required auth headers applied.
If a session object is provided, configure it directly. Otherwise,
create a new session and return it.
:param session: The session to configure for authentication
:type session: requests.Session
:rtype: requests.Session
"""
session = super(AdalAuthentication, self).signed_session(session)
try:
> raw_token = self._adal_method(*self._args, **self._kwargs)
../.venv/lib/python3.8/site-packages/msrestazure/azure_active_directory.py:448:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <adal.authentication_context.AuthenticationContext object at 0x7fd9e563ed30>, resource = 'https://management.core.windows.net/', client_id = None
client_secret = None
def acquire_token_with_client_credentials(self, resource, client_id, client_secret):
'''Gets a token for a given resource via client credentials.
:param str resource: A URI that identifies the resource for which the
token is valid.
:param str client_id: The OAuth client id of the calling application.
:param str client_secret: The OAuth client secret of the calling application.
:returns: dict with several keys, include "accessToken".
'''
def token_func(self):
token_request = TokenRequest(self._call_context, self, client_id, resource)
return token_request.get_token_with_client_credentials(client_secret)
> return self._acquire_token(token_func)
../.venv/lib/python3.8/site-packages/adal/authentication_context.py:179:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <adal.authentication_context.AuthenticationContext object at 0x7fd9e563ed30>
token_func = <function AuthenticationContext.acquire_token_with_client_credentials.<locals>.token_func at 0x7fd9e45d6790>, correlation_id = None
def _acquire_token(self, token_func, correlation_id=None):
self._call_context['log_context'] = log.create_log_context(
correlation_id or self.correlation_id, self._call_context.get('enable_pii', False))
self.authority.validate(self._call_context)
> return token_func(self)
../.venv/lib/python3.8/site-packages/adal/authentication_context.py:128:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <adal.authentication_context.AuthenticationContext object at 0x7fd9e563ed30>
def token_func(self):
token_request = TokenRequest(self._call_context, self, client_id, resource)
> return token_request.get_token_with_client_credentials(client_secret)
../.venv/lib/python3.8/site-packages/adal/authentication_context.py:177:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <adal.token_request.TokenRequest object at 0x7fd9e45cad00>, client_secret = None
def get_token_with_client_credentials(self, client_secret):
self._log.debug("Getting token with client credentials.")
try:
token = self._find_token_from_cache()
if token:
return token
except AdalError:
self._log.exception('Attempt to look for token in cache resulted in Error')
oauth_parameters = self._create_oauth_parameters(OAUTH2_GRANT_TYPE.CLIENT_CREDENTIALS)
oauth_parameters[OAUTH2_PARAMETERS.CLIENT_SECRET] = client_secret
> token = self._oauth_get_token(oauth_parameters)
../.venv/lib/python3.8/site-packages/adal/token_request.py:310:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <adal.token_request.TokenRequest object at 0x7fd9e45cad00>
oauth_parameters = {'client_secret': None, 'grant_type': 'client_credentials', 'resource': 'https://management.core.windows.net/'}
def _oauth_get_token(self, oauth_parameters):
client = self._create_oauth2_client()
> return client.get_token(oauth_parameters)
../.venv/lib/python3.8/site-packages/adal/token_request.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <adal.oauth2_client.OAuth2Client object at 0x7fd9e45ca550>
oauth_parameters = {'client_secret': None, 'grant_type': 'client_credentials', 'resource': 'https://management.core.windows.net/'}
def get_token(self, oauth_parameters):
token_url = self._create_token_url()
url_encoded_token_request = urlencode(oauth_parameters)
post_options = util.create_request_options(self, _REQ_OPTION)
operation = "Get Token"
try:
resp = requests.post(token_url.geturl(),
data=url_encoded_token_request,
headers=post_options['headers'],
verify=self._call_context.get('verify_ssl', None),
proxies=self._call_context.get('proxies', None),
timeout=self._call_context.get('timeout', None))
util.log_return_correlation_id(self._log, operation, resp)
except Exception:
self._log.exception("%(operation)s request failed", {"operation": operation})
raise
if util.is_http_success(resp.status_code):
return self._handle_get_token_response(resp.text)
else:
if resp.status_code == 429:
resp.raise_for_status() # Will raise requests.exceptions.HTTPError
return_error_string = _ERROR_TEMPLATE.format(operation, resp.status_code)
error_response = ""
if resp.text:
return_error_string = u"{} and server response: {}".format(return_error_string,
resp.text)
try:
error_response = resp.json()
except ValueError:
pass
> raise AdalError(return_error_string, error_response)
E adal.adal_error.AdalError: Get Token request returned http error: 400 and server response: {"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter: 'client_id'.\r\nTrace ID: 9ff1d754-5f79-403a-9ae7-31cd01d02800\r\nCorrelation ID: 8eeb21da-25ab-4993-8ed7-76b06b6837b4\r\nTimestamp: 2020-01-16 16:47:32Z","error_codes":[900144],"timestamp":"2020-01-16 16:47:32Z","trace_id":"9ff1d754-5f79-403a-9ae7-31cd01d02800","correlation_id":"8eeb21da-25ab-4993-8ed7-76b06b6837b4","error_uri":"https://login.microsoftonline.com/error?code=900144"}
../.venv/lib/python3.8/site-packages/adal/oauth2_client.py:289: AdalError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="session")
def workspace():
> return get_workspace()
test/perf/conftest.py:71:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../.venv/lib/python3.8/site-packages/tempeh/execution/azureml/workspace.py:48: in get_workspace
resource_management_client = resource_client_factory(auth, SUBSCRIPTION_ID)
../.venv/lib/python3.8/site-packages/azureml/_base_sdk_common/common.py:354: in resource_client_factory
return auth._get_service_client(ResourceManagementClient, subscription_id)
../.venv/lib/python3.8/site-packages/azureml/core/authentication.py:146: in _get_service_client
return _get_service_client_using_arm_token(self, client_class, subscription_id,
../.venv/lib/python3.8/site-packages/azureml/core/authentication.py:1590: in _get_service_client_using_arm_token
adal_auth_object = auth._get_adal_auth_object()
../.venv/lib/python3.8/site-packages/azureml/core/authentication.py:191: in _get_adal_auth_object
token = self.get_authentication_header()["Authorization"].split(" ")[1]
../.venv/lib/python3.8/site-packages/azureml/core/authentication.py:88: in get_authentication_header
auth_header = {"Authorization": "Bearer " + self._get_arm_token()}
../.venv/lib/python3.8/site-packages/azureml/core/authentication.py:863: in wrapper
new_token = actual_function(self, *args, **kwargs)
../.venv/lib/python3.8/site-packages/azureml/core/authentication.py:962: in _get_arm_token
header = execute_func(self._get_sp_credential_object().signed_session).headers['Authorization']
../.venv/lib/python3.8/site-packages/azureml/_restclient/clientbase.py:51: in execute_func
return ClientBase._execute_func_internal(
../.venv/lib/python3.8/site-packages/azureml/_restclient/clientbase.py:294: in _execute_func_internal
left_retry = cls._handle_retry(back_off, left_retry, total_retry, error, logger, func)
../.venv/lib/python3.8/site-packages/azureml/_restclient/clientbase.py:345: in _handle_retry
raise error
../.venv/lib/python3.8/site-packages/azureml/_restclient/clientbase.py:292: in _execute_func_internal
return func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <msrestazure.azure_active_directory.AdalAuthentication object at 0x7fd9e7c793a0>, session = <requests.sessions.Session object at 0x7fd9e7c791c0>
def signed_session(self, session=None):
"""Create requests session with any required auth headers applied.
If a session object is provided, configure it directly. Otherwise,
create a new session and return it.
:param session: The session to configure for authentication
:type session: requests.Session
:rtype: requests.Session
"""
session = super(AdalAuthentication, self).signed_session(session)
try:
raw_token = self._adal_method(*self._args, **self._kwargs)
except adal.AdalError as err:
# pylint: disable=no-member
if 'AADSTS70008:' in ((getattr(err, 'error_response', None) or {}).get('error_description') or ''):
raise Expired("Credentials have expired due to inactivity.")
else:
> raise AuthenticationError(err)
E msrest.exceptions.AuthenticationError: Get Token request returned http error: 400 and server response: {"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter: 'client_id'.\r\nTrace ID: 9ff1d754-5f79-403a-9ae7-31cd01d02800\r\nCorrelation ID: 8eeb21da-25ab-4993-8ed7-76b06b6837b4\r\nTimestamp: 2020-01-16 16:47:32Z","error_codes":[900144],"timestamp":"2020-01-16 16:47:32Z","trace_id":"9ff1d754-5f79-403a-9ae7-31cd01d02800","correlation_id":"8eeb21da-25ab-4993-8ed7-76b06b6837b4","error_uri":"https://login.microsoftonline.com/error?code=900144"}
../.venv/lib/python3.8/site-packages/msrestazure/azure_active_directory.py:454: AuthenticationError