AttributeError: 'AuthorizedSession' object has no attribute 'configure_mtls_channel'

AttributeError: 'AuthorizedSession' object has no attribute 'configure_mtls_channel'

我正在使用 Cloud Composer 编排两个数据流作业,它在一个月内都运行良好。突然这两个作业停止工作并出现以下错误消息:

in download_blob File "/usr/local/lib/python3.6/site-packages/google/cloud/storage/client.py", line 399, in get_bucket retry=retry, File "/usr/local/lib/python3.6/site-packages/google/cloud/storage/bucket.py", line 1002, in reload retry=retry, File "/usr/local/lib/python3.6/site-packages/google/cloud/storage/_helpers.py", line 225, in reload retry=retry, File "/usr/local/lib/python3.6/site-packages/google/cloud/storage/_http.py", line 63, in api_request return call() File "/usr/local/lib/python3.6/site-packages/google/api_core/retry.py", line 286, in retry_wrapped_func on_error=on_error, File "/usr/local/lib/python3.6/site-packages/google/api_core/retry.py", line 184, in retry_target return target() File "/usr/local/lib/python3.6/site-packages/google/cloud/_http.py", line 479, in api_request timeout=timeout, File "/usr/local/lib/python3.6/site-packages/google/cloud/_http.py", line 337, in _make_request method, url, headers, data, target_object, timeout=timeout File "/usr/local/lib/python3.6/site-packages/google/cloud/_http.py", line 374, in _do_request return self.http.request( File "/usr/local/lib/python3.6/site-packages/google/cloud/_http.py", line 157, in http return self._client._http File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 187, in _http self._http_internal.configure_mtls_channel(self._client_cert_source) AttributeError: 'AuthorizedSession' object has no attribute 'configure_mtls_channel'

在作业中,我使用存储客户端从 google 云存储下载了一个文件。我认为这是因为一些依赖性问题。在 composer 环境中,我安装了 google-cloud-storage,但没有指定版本。我尝试指定不同版本的包,但似乎没有任何效果。

谢谢!

这似乎与此issue有关。

让他们恢复工作后尝试 pinning google-cloud-core to 1.5.0, then I highly recommend for you to Drain 您的工作(假设他们有流媒体工作)。