python - 在 MacOS Catalina 升级后部署 Google Dataflow 模板时,Protobuf 的数据库错误中已存在文件

标签 python macos homebrew google-cloud-dataflow apache-beam

我有一个使用 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

我已完成以下所有操作,并多次重新启动:

  1. 运行xcode-select --install

  2. 运行 brew update-resetbrew updatebrew upgradebrew reinstall python全部无效(除了 brew update-reset 之后,brew doctor 再次工作)

  3. 运行 brew uninstall protobufbrew install protobuf

  4. 在虚拟环境之外运行 pip3 uninstall protobuf

  5. 从他们的需求文件中删除并重新创建了我的虚拟环境。

  6. 一些涉及 /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/

相关文章:

python - 用于散点图的 Matplotlib FuncAnimation

Cocoa 屏幕保护程序框架错误消息

macos - Xcode 7 : Binding an array controller to a radio button group

node.js - 在我已经安装了 Node git 和 gulp 之后安装 homebrew - 这会导致问题吗?

python - SQLAlchemy 中的导入错误

Python - 列表 : How To Remove Empty Attributes From a List of Dictionaries With Nested Properties?

python - 获取表中至少有 1 个科目的所有教师 - Django 查询集

mysql - MacOS 无法启动 MySQL 服务器

python - 如何将 PyCharm 与 PySpark 链接?

php - php-fpm 在哪里获取其在 osx 上的配置值