Skip to content

Commit 874b26b

Browse files
partheatswast
authored andcommitted
CLN: Minor tweak to error message shown when dependencies are missing (#145)
1 parent 672b357 commit 874b26b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

pandas_gbq/gbq.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ def _check_google_client_version():
2929

3030
if (StrictVersion(_BIGQUERY_CLIENT_VERSION) <
3131
StrictVersion(bigquery_client_minimum_version)):
32-
raise ImportError('pandas requires google-cloud-bigquery >= {0} '
33-
'for Google BigQuery support, '
32+
raise ImportError('pandas-gbq requires google-cloud-bigquery >= {0}, '
3433
'current version {1}'
3534
.format(bigquery_client_minimum_version,
3635
_BIGQUERY_CLIENT_VERSION))
@@ -42,22 +41,19 @@ def _test_google_api_imports():
4241
from google_auth_oauthlib.flow import InstalledAppFlow # noqa
4342
except ImportError as ex:
4443
raise ImportError(
45-
'pandas requires google-auth-oauthlib for Google BigQuery '
46-
'support: {0}'.format(ex))
44+
'pandas-gbq requires google-auth-oauthlib: {0}'.format(ex))
4745

4846
try:
4947
import google.auth # noqa
5048
except ImportError as ex:
5149
raise ImportError(
52-
"pandas requires google-auth for Google BigQuery support: "
53-
"{0}".format(ex))
50+
"pandas-gbq requires google-auth: {0}".format(ex))
5451

5552
try:
5653
from google.cloud import bigquery # noqa
5754
except ImportError as ex:
5855
raise ImportError(
59-
"pandas requires google-cloud-python for Google BigQuery support: "
60-
"{0}".format(ex))
56+
"pandas-gbq requires google-cloud-bigquery: {0}".format(ex))
6157

6258
_check_google_client_version()
6359

0 commit comments

Comments
 (0)