我的脚本正常工作,但是当我在docker上运行它时会发生错误。
app_1 | from google.cloud import pubsub
app_1 | File "/usr/local/lib/python3.5/site-packages/google/cloud/pubsub/__init__.py", line 30, in <module>
app_1 | from google.cloud.pubsub.client import Client
app_1 | File "/usr/local/lib/python3.5/site-packages/google/cloud/pubsub/client.py", line 19, in <module>
app_1 | from google.cloud.client import ClientWithProject
app_1 | ImportError: cannot import name 'ClientWithProject'
在码头工具要求中,我添加了google-cloud-pubsub == 0.23.0