Traceback (most recent call last):


 "/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py", line 26, in signed_session

scheme, token, _ = self._token_retriever()


 "/opt/az/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 535, in _retrieve_token

account[_TENANT_ID], resource)


 "/opt/az/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 905, in retrieve_token_for_user

token_entry = context.acquire_token(resource, username, _CLIENT_ID)


 "/opt/az/lib/python3.6/site-packages/adal/authentication_context.py", line 145, in acquire_token

return self._acquire_token(token_func)


 "/opt/az/lib/python3.6/site-packages/adal/authentication_context.py", line 128, in _acquire_token

return token_func(self)


 "/opt/az/lib/python3.6/site-packages/adal/authentication_context.py", line 143, in token_func

return token_request.get_token_from_cache_with_refresh(user_id)


 "/opt/az/lib/python3.6/site-packages/adal/token_request.py", line 352, in get_token_from_cache_with_refresh

return self._find_token_from_cache()


 "/opt/az/lib/python3.6/site-packages/adal/token_request.py", line 128, in _find_token_from_cache

return self._cache_driver.find(cache_query)


 "/opt/az/lib/python3.6/site-packages/adal/cache_driver.py", line 199, in find

is_resource_tenant_specific)


 "/opt/az/lib/python3.6/site-packages/adal/cache_driver.py", line 177, in _refresh_entry_if_necessary

return self._refresh_expired_entry(entry)


 "/opt/az/lib/python3.6/site-packages/adal/cache_driver.py", line 153, in _refresh_expired_entry

token_response = self._refresh_function(entry, None)


 "/opt/az/lib/python3.6/site-packages/adal/token_request.py", line 138, in _get_token_with_token_response

return self._get_token_with_refresh_token(refresh_token, resource, None)


 "/opt/az/lib/python3.6/site-packages/adal/token_request.py", line 344, in _get_token_with_refresh_token

return self._oauth_get_token(oauth_parameters)


 "/opt/az/lib/python3.6/site-packages/adal/token_request.py", line 113, in _oauth_get_token

return client.get_token(oauth_parameters)


 "/opt/az/lib/python3.6/site-packages/adal/oauth2_client.py", line 289, in get_token

raise AdalError(return_error_string, error_response)
adal.adal_error.AdalError: Get Token request returned http error: 504

Traceback (most recent call last):


 "/usr/lib/python3.8/site-packages/ocrmypdf/_sync.py", line 397, in run_pipeline

if not check_pdf(options.output_file):


 "/usr/lib/python3.8/site-packages/ocrmypdf/helpers.py", line 191, in check_pdf

pdf.check_linearization(sio)
pikepdf._qpdf.ForeignObjectError: called readLinearizationData for file that is not linearized
