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:
---------------------------------------------------------------------------
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.