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

pkg_resources.DistributionNotFound on v1.12.10 #1670

Closed
kyohei3 opened this issue Jan 24, 2022 · 2 comments
Closed

pkg_resources.DistributionNotFound on v1.12.10 #1670

kyohei3 opened this issue Jan 24, 2022 · 2 comments
Labels
priority: p2 Moderately-important priority. 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

@kyohei3
Copy link

kyohei3 commented Jan 24, 2022

We are using bazel to build our app, and facing the following issue that is basically same with #1622.
I found #1622 was fixed by #1623, but for some restriction on our environment, I cannot upgrade google-api-python-client to v2.x.

May I create a pull request that apply the same fixes to the v1 branch?

Environment details

Building a container image with Bazel python rules.

Code example

from googleapiclient.model import JsonModel

Stack trace

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/app/googleapiclient/model.py", line 36, in <module>
    _LIBRARY_VERSION = pkg_resources.get_distribution("google-api-python-client").version
  File "/app/pkg_resources/__init__.py", line 466, in get_distribution
    dist = get_provider(dist)
  File "/app/pkg_resources/__init__.py", line 342, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/app/pkg_resources/__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/app/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'google-api-python-client' distribution was not found and is required by the application
@parthea
Copy link
Contributor

parthea commented Jan 24, 2022

Hello @kyohei3 ,

Yes, PRs are welcome!

@parthea parthea added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jan 24, 2022
@parthea
Copy link
Contributor

parthea commented Jan 31, 2022

Fixed in #1677

@parthea parthea closed this as completed Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. 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

2 participants