Skip to content

ImportError: pandas-gbq requires db-dtypes #873

Closed
@khaerulumam42

Description

@khaerulumam42

Thanks for stopping by to let us know something could be better!

Environment details

  • OS type and version: Debian version 10
  • Python version: 3.8
  • pip version: 24.3.1
  • pandas-gbq version: 0.17.0

Steps to reproduce

  1. pip install pandas-gbq==0.17.0

Code example

import pandas gbq

query = 'some query'

df = pandas_gbq.read_gbq(query, project_id=MY_GOOGLE_PROJECT_ID, credentials=credentials)

Stack trace

File "/opt/venv/lib/python3.8/site-packages/pandas_gbq/gbq.py", line 830, in read_gbq
_test_google_api_imports()
File "/opt/venv/lib/python3.8/site-packages/pandas_gbq/gbq.py", line 46, in _test_google_api_imports
raise ImportError("pandas-gbq requires db-dtypes") from ex
ImportError: pandas-gbq requires db-dtypes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 21, in <module>
service()
File "/app/modules/service.py", line 37, in __exit__
raise exc_type(exc_value)
ImportError: pandas-gbq requires db-dtypes

After I check, this issue because new version of db-dtypes==1.4.0, that just released on 23 January 2025. force use db-dtypes==1.3.1 solve my issue, can you make the dependencies is exactly use db-dtypes==1.3.1?

thank you

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery-pandas API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions