Skip to content

Commit cb38843

Browse files
holtskinnerparthea
andauthored
Update google/cloud/documentai_toolbox/utilities/gcs_utilities.py
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 701d552 commit cb38843

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

google/cloud/documentai_toolbox/utilities/gcs_utilities.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ def get_blob(
144144
raise ValueError("gcs_uri must link to a single file.")
145145

146146
try:
147-
version = pkg_resources.get_distribution("google-cloud-storage").version
148-
except pkg_resources.DistributionNotFound:
147+
version = importlib.metadata.version("google-cloud-storage")
148+
except importlib.metadata.PackageNotFoundError:
149149
raise ImportError("google-cloud-storage is not installed.")
150150

151151
client = _get_storage_client(module=module)

0 commit comments

Comments
 (0)