[英]AttributeError when importing google cloud big query library
Today I tried to use my new computer to run the libraries I have been using at work, but I've encountered this error when I tried to import bigquery:今天我尝试用我的新电脑来运行我在工作中一直使用的库,但是当我尝试导入bigquery时遇到了这个错误:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
from google.cloud import bigquery
~\anaconda3\envs\base\lib\site-packages\google\cloud\bigquery\__init__.py in <module>
33 __version__ = get_distribution("google-cloud-bigquery").version
34
---> 35 from google.cloud.bigquery.client import Client
36 from google.cloud.bigquery.dataset import AccessEntry
37 from google.cloud.bigquery.dataset import Dataset
~\anaconda3\envs\base\lib\site-packages\google\cloud\bigquery\client.py in <module>
56 from google.cloud.bigquery._helpers import _verify_job_config_type
57 from google.cloud.bigquery._http import Connection
---> 58 from google.cloud.bigquery import _pandas_helpers
59 from google.cloud.bigquery.dataset import Dataset
60 from google.cloud.bigquery.dataset import DatasetListItem
~\anaconda3\envs\base\lib\site-packages\google\cloud\bigquery\_pandas_helpers.py in <module>
38 pyarrow = None
39
---> 40 from google.cloud.bigquery import schema
41
42
~\anaconda3\envs\base\lib\site-packages\google\cloud\bigquery\schema.py in <module>
26 # https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types
27 LEGACY_TO_STANDARD_TYPES = {
---> 28 "STRING": types.StandardSqlDataType.STRING,
29 "BYTES": types.StandardSqlDataType.BYTES,
30 "INTEGER": types.StandardSqlDataType.INT64,
AttributeError: type object 'StandardSqlDataType' has no attribute 'STRING'
I'm new to programming so I don't know where to start solving the problem.我是编程新手,所以我不知道从哪里开始解决问题。 I tried googling but didn't find a similar question raised.
我尝试谷歌搜索,但没有发现提出了类似的问题。
跑
python3 -m pip install -U google-cloud-bigquery
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.