import basedosdados as bd
bd.download(savepath="~/Downloads/test.csv",dataset_id='br_suporte',table_id='diretorio_municipios')
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-1-c0f5299e96d1> in <module>
1 import basedosdados as bd
2
----> 3 bd.download(savepath="~/Downloads/test.csv",dataset_id='br_suporte',table_id='diretorio_municipios')
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/basedosdados/download.py in download(savepath, query, dataset_id, table_id, project_id, limit, **pandas_kwargs)
58
59 if (dataset_id is not None) and (table_id is not None):
---> 60 table = read_table(dataset_id, table_id, limit=limit)
61 elif query is not None:
62 if limit is not None:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/basedosdados/download.py in read_table(dataset_id, table_id, project_id, limit)
124 raise Exception("Both table_id and dataset_id should be filled.")
125
--> 126 return read_sql(query)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/basedosdados/download.py in read_sql(query)
88 Query result
89 """
---> 90 client = bigquery.Client()
91 return client.query(query).to_dataframe()
92
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/cloud/bigquery/client.py in __init__(self, project, credentials, _http, location, default_query_job_config, client_info, client_options)
178 client_options=None,
179 ):
--> 180 super(Client, self).__init__(
181 project=project,
182 credentials=credentials,
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/cloud/client.py in __init__(self, project, credentials, client_options, _http)
247
248 def __init__(self, project=None, credentials=None, client_options=None, _http=None):
--> 249 _ClientProjectMixin.__init__(self, project=project)
250 Client.__init__(self, credentials=credentials, client_options=client_options, _http=_http)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/cloud/client.py in __init__(self, project)
201 project = self._determine_default(project)
202 if project is None:
--> 203 raise EnvironmentError(
204 "Project was not passed and could not be "
205 "determined from the environment."
OSError: Project was not passed and could not be determined from the environment.