Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import module: ModuleNotFoundError: No module named 'pytz' #1589

Closed
bobidle opened this issue Jun 21, 2023 · 2 comments
Closed

Cannot import module: ModuleNotFoundError: No module named 'pytz' #1589

bobidle opened this issue Jun 21, 2023 · 2 comments
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bobidle
Copy link

bobidle commented Jun 21, 2023

Noticed an issue with module version 1.28.3, if that module version is still supported please fix the following issue. Thank you very much.

Environment details

  • OS type and version: Debian Linux 11.7
  • Python version: 3.9.2
  • pip version: pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)
  • google-cloud-bigquery version: ` 1.28.3

Steps to reproduce

  1. install google-cloud-bigquery==1.28.3 via pip
  2. run example code

Code example

from google.cloud import bigquery

Stack trace

  File "/home/user/bigquery/test.py", line 1, in <module>
    from google.cloud import bigquery
  File "/home/user/.local/lib/python3.9/site-packages/google/cloud/bigquery/__init__.py", line 35, in <module>
    from google.cloud.bigquery.client import Client
  File "/home/user/.local/lib/python3.9/site-packages/google/cloud/bigquery/client.py", line 62, in <module>
    from google.cloud.bigquery.dataset import Dataset
  File "/home/user/.local/lib/python3.9/site-packages/google/cloud/bigquery/dataset.py", line 27, in <module>
    from google.cloud.bigquery.table import TableReference
  File "/home/user/.local/lib/python3.9/site-packages/google/cloud/bigquery/table.py", line 24, in <module>
    import pytz
ModuleNotFoundError: No module named 'pytz'

Related issue: #885

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Jun 21, 2023
@meredithslota
Copy link
Contributor

Hi there — thanks for reporting this! As you noted, this is a duplicate of this issue: #885 We do keep a v1 branch alive for high-priority fixes but since we didn't backport this at the time, it may not qualify.

@meredithslota meredithslota added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Jun 22, 2023
@chalmerlowe
Copy link
Contributor

A while back, api-core dropped the pytz dependency which our older python-bigquery library implicitly depends on.

A workaround is to install pytz manually if using an older BigQuery client version.
Based on manpower and priorities, I don't see us working on this right away.

A change related to this was made in a 2.x version of python-bigquery (linking here for posterity):

I recommend closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants