Python bigquery lib 错误 'pyarrow' 没有属性 'decimal256'

Python bigquery lib error 'pyarrow' has no attribute 'decimal256'

A​​ttributeError: 模块 'pyarrow' 没有属性 'decimal256' 好像是bigquery python包的错误,应该怎么处理?

整个堆栈是:

  File "/opt/conda/default/lib/python3.7/site-packages/google/cloud/bigquery/__init__.py", line 35, in <module>
    from google.cloud.bigquery.client import Client
  File "/opt/conda/default/lib/python3.7/site-packages/google/cloud/bigquery/client.py", line 70, in <module>
    from google.cloud.bigquery import _pandas_helpers
  File "/opt/conda/default/lib/python3.7/site-packages/google/cloud/bigquery/_pandas_helpers.py", line 151, in <module>
    pyarrow.decimal256(76, scale=38).id: "BIGNUMERIC",
AttributeError: module 'pyarrow' has no attribute 'decimal256'

我上周遇到了这个问题。我今天解决了这个问题。 问题不在 google API 中。问题出在pyarrow。 我只是把pyarrow包的版本改成5.0.0版本(pyarrow==5.0.0),问题就解决了。