在 MacOS Catalina 升级后部署 Google 数据流模板时,Protobuf 中的文件已存在于数据库错误中
File already exists in database error from Protobuf when deploying Google Dataflow template after MacOS Catalina upgrade
我有一个使用 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 this issue is related with a pyarrow version, you have to test with pyarrow 0.15.1 beam since is the one which works on MacOS 10.15 as is mentioned in this link。
请告诉我们它是如何工作的。
我就把它放在这里,因为这是一个维护者没有解决的常见问题,我当时也没有找到最方便的解决方案。
https://github.com/protocolbuffers/protobuf/issues/1941
补丁实际上并没有帮助,因为在下一步中,protobuf 确实挂在 Run
函数中并且调用不会 return。
对我来说最接近的解决方案是不惜一切代价完全避免与 protobuf 的任何双重链接。
我有一个使用 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 this issue is related with a pyarrow version, you have to test with pyarrow 0.15.1 beam since is the one which works on MacOS 10.15 as is mentioned in this link。
请告诉我们它是如何工作的。
我就把它放在这里,因为这是一个维护者没有解决的常见问题,我当时也没有找到最方便的解决方案。
https://github.com/protocolbuffers/protobuf/issues/1941
补丁实际上并没有帮助,因为在下一步中,protobuf 确实挂在 Run
函数中并且调用不会 return。
对我来说最接近的解决方案是不惜一切代价完全避免与 protobuf 的任何双重链接。