Skip to content

'BatchServiceClientConfiguration' object has no attribute 'signed_session' #288

Description

@aizest

Get "'BatchServiceClientConfiguration' object has no attribute 'signed_session'" exception when creating pool with the following Python code.

new_pool = batch.models.PoolAddParameter(
id='GPU-Pool',
virtual_machine_configuration=batch.models.VirtualMachineConfiguration(
image_reference=image_ref_to_use,
container_configuration=container_conf,
node_agent_sku_id='batch.node.ubuntu 16.04'),
vm_size='Standard_NC6',
target_low_priority_nodes=1)
batch_client.pool.add(new_pool)

I'm using the following related python packages under Python 3.7:

azure-batch==8.0.0
azure-common==1.1.23
azure-nspkg==3.0.2
azure-storage==0.36.0
msrestazure==0.6.2

Please advise, thanks!

The complete exception stack is like:


AttributeError Traceback (most recent call last)
in ()
7 vm_size='Standard_NC6',
8 target_low_priority_nodes=1)
----> 9 batch_client.pool.add(new_pool)

/anaconda3/lib/python3.7/site-packages/azure/batch/operations/_pool_operations.py in add(self, pool, pool_add_options, custom_headers, raw, **operation_config)
320 # Construct and send request
321 request = self._client.post(url, query_parameters, header_parameters, body_content)
--> 322 response = self._client.send(request, stream=False, **operation_config)
323
324 if response.status_code not in [201]:

/anaconda3/lib/python3.7/site-packages/msrest/service_client.py in send(self, request, headers, content, **kwargs)
334 kwargs.setdefault('stream', True)
335 try:
--> 336 pipeline_response = self.config.pipeline.run(request, **kwargs)
337 # There is too much thing that expects this method to return a "requests.Response"
338 # to break it in a compatible release.

/anaconda3/lib/python3.7/site-packages/msrest/pipeline/init.py in run(self, request, **kwargs)
195 pipeline_request = Request(request, context) # type: Request[HTTPRequestType]
196 first_node = self._impl_policies[0] if self._impl_policies else self._sender
--> 197 return first_node.send(pipeline_request, **kwargs) # type: ignore
198
199 class HTTPSender(AbstractContextManager, ABC, Generic[HTTPRequestType, HTTPResponseType]):

/anaconda3/lib/python3.7/site-packages/msrest/pipeline/init.py in send(self, request, **kwargs)
148 self._policy.on_request(request, **kwargs)
149 try:
--> 150 response = self.next.send(request, **kwargs)
151 except Exception:
152 if not self._policy.on_exception(request, **kwargs):

/anaconda3/lib/python3.7/site-packages/msrest/pipeline/requests.py in send(self, request, **kwargs)
63 session = request.context.session
64 try:
---> 65 self._creds.signed_session(session)
66 except TypeError: # Credentials does not support session injection
67 _LOGGER.warning("Your credentials class does not support session injection. Performance will not be at the maximum.")

AttributeError: 'BatchServiceClientConfiguration' object has no attribute 'signed_session'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions