gpt4 book ai didi

python - 得到一个意外的关键字参数 'timeout'(Python 中的 google-cloud-storage)

转载 作者:行者123 更新时间:2023-12-04 01:17:36 30 4
gpt4 key购买 nike

使用 google-cloud-storage 的 Python 项目在本地运行良好,但从 App Engine 运行时显示错误:

Traceback (most recent call last): 
File "/opt/python3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run()
File "/opt/python3.7/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) [...]
File "/env/lib/python3.7/site-packages/google/cloud/storage/blob.py", line 2107, in upload_from_string timeout=timeout,
File "/env/lib/python3.7/site-packages/google/cloud/storage/blob.py", line 1921, in upload_from_file timeout=timeout,
File "/env/lib/python3.7/site-packages/google/cloud/storage/blob.py", line 1769, in _do_upload timeout=timeout,
File "/env/lib/python3.7/site-packages/google/cloud/storage/blob.py", line 1405, in _do_multipart_upload transport, data, object_metadata, content_type, timeout=timeout
TypeError: transmit() got an unexpected keyword argument 'timeout'

最佳答案

安装 google-resumable-media==0.6 解决了这个问题。之前安装的版本是0.7。

pip uninstall google-resumable-media
pip uninstall google-cloud-storage
pip install google-resumable-media==0.6.0
pip install google-cloud-storage==1.30.0

关于python - 得到一个意外的关键字参数 'timeout'(Python 中的 google-cloud-storage),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63082277/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com