我有一个使用 Google Dataflow 的项目。几个月来,我一直成功地使用以下命令(和类似的命令)来部署模板。
.venv/bin/python -m dataflow.registry_files.delimited_file --runner=DataflowRunner --region=us-central1 --project=myproject --staging_location=gs://mybucket-staging/staging/gr265 --template_location=gs://mybucket-code/templates/gr265 --temp_location=gs://mybucket-staging/temp/gr265 --no_use_public_ips --save_main_session --setup_file=dataflow/setup.py --projectId=myproject --datasetId=padl_staging --tableId=gr265 --configFile=gs://mybucket-code/registry/registry_files.yaml --fileType=gr265
此命令继续在我团队中的 Windows 10 和 Debian 机器上运行。
自从我升级到 catalina(10.15.1,使用 python 3.7.5 和 apache-beam==2.16.0)后,我收到以下错误:
[libprotobuf ERROR google/protobuf/descriptor_database.cc:58] File already exists in database:
[libprotobuf FATAL google/protobuf/descriptor.cc:1370] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException: CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
Abort trap: 6
我已完成以下所有操作,并多次重新启动:
运行
xcode-select --install
运行
brew update-reset
、brew update
、brew upgrade
和brew reinstall python
全部无效(除了brew update-reset
之后,brew doctor
再次工作)运行
brew uninstall protobuf
和brew install protobuf
在虚拟环境之外运行
pip3 uninstall protobuf
从他们的需求文件中删除并重新创建了我的虚拟环境。
一些涉及
/usr/local/include
的巫术,我在堆栈溢出的其他地方找到了,但没有帮助。
我想知道这是否只是我的机器,不幸的是能够在我团队中的其他 macOS Catalina 笔记本电脑上重现它,但不是仍在运行 macOS Mojave 的笔记本电脑。
最佳答案
根据Apache Beam Issue 8368此问题与 pyarrow 版本有关,您必须使用 pyarrow 0.15.1 beam 进行测试,因为它可以在 MacOS 10.15 上运行,如本 link 中所述.
请告诉我们它是如何工作的。
关于python - 在 MacOS Catalina 升级后部署 Google Dataflow 模板时,Protobuf 的数据库错误中已存在文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59165505/