You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/scizorman/dev/tmp/foo/.venv/lib/python3.9/site-packages/google/cloud/bigquery/__init__.py", line 35, in <module>
from google.cloud.bigquery.client import Client
File "/home/scizorman/dev/tmp/foo/.venv/lib/python3.9/site-packages/google/cloud/bigquery/client.py", line 71, in <module>
from google.cloud.bigquery.dataset import Dataset
File "/home/scizorman/dev/tmp/foo/.venv/lib/python3.9/site-packages/google/cloud/bigquery/dataset.py", line 25, in <module>
from google.cloud.bigquery.routine import RoutineReference
File "/home/scizorman/dev/tmp/foo/.venv/lib/python3.9/site-packages/google/cloud/bigquery/routine/__init__.py", line 18, in <module>
from google.cloud.bigquery.enums import DeterminismLevel
File "/home/scizorman/dev/tmp/foo/.venv/lib/python3.9/site-packages/google/cloud/bigquery/enums.py", line 21, in <module>
from google.cloud.bigquery.query import ScalarQueryParameterType
File "/home/scizorman/dev/tmp/foo/.venv/lib/python3.9/site-packages/google/cloud/bigquery/query.py", line 23, in <module>
from google.cloud.bigquery.table import _parse_schema_resource
File "/home/scizorman/dev/tmp/foo/.venv/lib/python3.9/site-packages/google/cloud/bigquery/table.py", line 23, in <module>
import pytz
ModuleNotFoundError: No module named 'pytz'
# Copyright 2015 Google LLC## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License."""Define API Tables."""from __future__ importabsolute_importimportcopyimportdatetimeimportfunctoolsimportoperatorimportpytz
...
I confirm this issue. On my project, this happened:
Dependabot attempted to update google-api-core from 1.31.2 to 2.0.0
google-api-core==2.0.0 removed the dependency on pytz
No other package depended on pytz, so the package was uninstalled
google-cloud-bigquery implicitly depends on pytz
The tests started failing with this traceback:
.venv/lib/python3.9/site-packages/google/cloud/bigquery/__init__.py:35: in <module>
from google.cloud.bigquery.client import Client
.venv/lib/python3.9/site-packages/google/cloud/bigquery/client.py:71: in <module>
from google.cloud.bigquery.dataset import Dataset
.venv/lib/python3.9/site-packages/google/cloud/bigquery/dataset.py:25: in <module>
from google.cloud.bigquery.routine import RoutineReference
.venv/lib/python3.9/site-packages/google/cloud/bigquery/routine/__init__.py:18: in <module>
from google.cloud.bigquery.enums import DeterminismLevel
.venv/lib/python3.9/site-packages/google/cloud/bigquery/enums.py:21: in <module>
from google.cloud.bigquery.query import ScalarQueryParameterType
.venv/lib/python3.9/site-packages/google/cloud/bigquery/query.py:23: in <module>
from google.cloud.bigquery.table import _parse_schema_resource
.venv/lib/python3.9/site-packages/google/cloud/bigquery/table.py:23: in <module>
import pytz
E ModuleNotFoundError: No module named 'pytz'
Activity
hieumdd commentedon Aug 19, 2021
I've found this today.
setup.pyno longer has pytz, whiletable.pystill hasimport pytzEnvironment details
Steps to reproduce
pipenv install google-cloud-bigquerypipenv lock -r > requirements.txtEDjur commentedon Aug 19, 2021
Ditto. Also happens on
google-cloud-bigquery==2.23.2. Related: googleapis/python-api-core#250pietrodn commentedon Aug 19, 2021
I confirm this issue. On my project, this happened:
google-api-corefrom 1.31.2 to 2.0.0google-api-core==2.0.0removed the dependency onpytzpytz, so the package was uninstalledgoogle-cloud-bigqueryimplicitly depends onpytzHowever I see that a commit in master removes the implicit dependency of
google-cloud-bigqueryonpytz.I guess that the problem will be solved when a new release of the BigQuery lib is cut.
aciezkowski commentedon Aug 19, 2021
It seems there's a fix for it here #875 planned for 2.24.1, but it has not been released yet -> #879
plamut commentedon Aug 19, 2021
Right... the new version of
api-coredropped thepytzdependency which thepython-bigquerylibrary implicitly depends on.A fix is on the way (15 minutes or so if all goes right).
(and the workaround is to install
pytzmanually if using an older BigQuery client version)plamut commentedon Aug 19, 2021
Released. Sorry folks for the inconvenience!