Title: DistributionNotFound error potentially caused by pkg_resources · Issue #1307 · googleapis/python-bigquery · GitHub
Open Graph Title: DistributionNotFound error potentially caused by pkg_resources · Issue #1307 · googleapis/python-bigquery
X Title: DistributionNotFound error potentially caused by pkg_resources · Issue #1307 · googleapis/python-bigquery
Description: Hi, when using this package on my local machine I have no issues, however when deploying to our serverless environment in an AWS lambda we get the error seen at the bottom of this issue. We have tried numerous changes, such as using the ...
Open Graph Description: Hi, when using this package on my local machine I have no issues, however when deploying to our serverless environment in an AWS lambda we get the error seen at the bottom of this issue. We have tr...
X Description: Hi, when using this package on my local machine I have no issues, however when deploying to our serverless environment in an AWS lambda we get the error seen at the bottom of this issue. We have tr...
Opengraph URL: https://github.com/googleapis/python-bigquery/issues/1307
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DistributionNotFound error potentially caused by pkg_resources","articleBody":"Hi,\r\n\r\nwhen using this package on my local machine I have no issues, however when deploying to our serverless environment in an AWS lambda we get the error seen at the bottom of this issue.\r\n\r\nWe have tried numerous changes, such as using the same version of pip being used locally, and disabling slim in the serverless python requirements, but the issue is still happening. Locally we use poetry to install packages.\r\n\r\nWhen looking at the error message, the issue seems to be around pkg_resources, and from looking at other google packages I can see similar issues have been encountered and resolved around this. Is it possible to do something similar here? We are currently blocked from using this package until this issue is resolved.\r\n\r\n\r\nRelated issues from other projects:\r\nhttps://github.com/googleapis/python-api-core/issues/27\r\nhttps://github.com/googleapis/google-api-python-client/pull/1623/files\r\n\r\n#### Environment details\r\n\r\n - OS type and version: Linux on a docker container\r\n - Python version: `3.7.10`\r\n - pip version: `22.0.4`\r\n - `google-cloud-bigquery` version: `3.3.0`\r\n\r\n#### Steps to reproduce\r\n\r\n 1. Deploy the build and attempt to run any code\r\n\r\n#### Stack trace\r\n```\r\n{\r\n \"errorMessage\": \"The 'google-cloud-bigquery-storage' distribution was not found and is required by the application\",\r\n \"errorType\": \"DistributionNotFound\",\r\n \"stackTrace\": [\r\n \" File \\\"/var/lang/lib/python3.7/imp.py\\\", line 234, in load_module\\n return load_source(name, filename, file)\\n\",\r\n \" File \\\"/var/lang/lib/python3.7/imp.py\\\", line 171, in load_source\\n module = _load(spec)\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 696, in _load\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 677, in _load_unlocked\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap_external>\\\", line 728, in exec_module\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 219, in _call_with_frames_removed\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/datadog_lambda/handler.py\\\", line 27, in \u003cmodule>\\n handler_module = import_module(mod_name)\\n\",\r\n \" File \\\"/var/lang/lib/python3.7/importlib/__init__.py\\\", line 127, in import_module\\n return _bootstrap._gcd_import(name[level:], package, level)\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 1006, in _gcd_import\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 983, in _find_and_load\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 215, in wrapped_find_and_load_unlocked\\n return exec_and_call_hooks(module_name, wrapped, args, kwargs)\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 171, in exec_and_call_hooks\\n return wrapped(*args, **kwargs)\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 967, in _find_and_load_unlocked\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 677, in _load_unlocked\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap_external>\\\", line 728, in exec_module\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 219, in _call_with_frames_removed\\n\",\r\n \" File \\\"/var/task/handlers/functions/voz_rf.py\\\", line 10, in \u003cmodule>\\n from google.cloud.bigquery import Client\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 983, in _find_and_load\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 215, in wrapped_find_and_load_unlocked\\n return exec_and_call_hooks(module_name, wrapped, args, kwargs)\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 171, in exec_and_call_hooks\\n return wrapped(*args, **kwargs)\\n\",\r\n \" File \\\"/tmp/sls-py-req/google/cloud/bigquery/__init__.py\\\", line 35, in \u003cmodule>\\n from google.cloud.bigquery.client import Client\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 983, in _find_and_load\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 215, in wrapped_find_and_load_unlocked\\n return exec_and_call_hooks(module_name, wrapped, args, kwargs)\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 171, in exec_and_call_hooks\\n return wrapped(*args, **kwargs)\\n\",\r\n \" File \\\"/tmp/sls-py-req/google/cloud/bigquery/client.py\\\", line 59, in \u003cmodule>\\n from google.cloud.bigquery_storage_v1.services.big_query_read.client import (\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 983, in _find_and_load\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 215, in wrapped_find_and_load_unlocked\\n return exec_and_call_hooks(module_name, wrapped, args, kwargs)\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 171, in exec_and_call_hooks\\n return wrapped(*args, **kwargs)\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 983, in _find_and_load\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 215, in wrapped_find_and_load_unlocked\\n return exec_and_call_hooks(module_name, wrapped, args, kwargs)\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 171, in exec_and_call_hooks\\n return wrapped(*args, **kwargs)\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 983, in _find_and_load\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 215, in wrapped_find_and_load_unlocked\\n return exec_and_call_hooks(module_name, wrapped, args, kwargs)\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 171, in exec_and_call_hooks\\n return wrapped(*args, **kwargs)\\n\",\r\n \" File \\\"\u003cfrozen importlib._bootstrap>\\\", line 983, in _find_and_load\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 215, in wrapped_find_and_load_unlocked\\n return exec_and_call_hooks(module_name, wrapped, args, kwargs)\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/ddtrace/internal/import_hooks.py\\\", line 171, in exec_and_call_hooks\\n return wrapped(*args, **kwargs)\\n\",\r\n \" File \\\"/tmp/sls-py-req/google/cloud/bigquery_storage_v1/__init__.py\\\", line 22, in \u003cmodule>\\n \\\"google-cloud-bigquery-storage\\\"\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/pkg_resources/__init__.py\\\", line 481, in get_distribution\\n dist = get_provider(dist)\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/pkg_resources/__init__.py\\\", line 357, in get_provider\\n return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/pkg_resources/__init__.py\\\", line 900, in require\\n needed = self.resolve(parse_requirements(requirements))\\n\",\r\n \" File \\\"/opt/python/lib/python3.7/site-packages/pkg_resources/__init__.py\\\", line 786, in resolve\\n raise DistributionNotFound(req, requirers)\\n\"\r\n ]\r\n}\r\n```\r\n","author":{"url":"https://github.com/dionearle","@type":"Person","name":"dionearle"},"datePublished":"2022-08-09T03:32:54Z","url":"https://github.com/googleapis/python-bigquery/issues/1307"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7be02f19-cbbd-dc03-ac46-745794b0352d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8DC6:2FE0A8:84481E:BB4A57:6AFE1A25 |
| html-safe-nonce | 9ddffb34b6891f7d40d526ffdcc92f589e807ff85babcffa4d5a49e39e1a5e2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4REM2OjJGRTBBODo4NDQ4MUU6QkI0QTU3OjZBRkUxQTI1IiwidmlzaXRvcl9pZCI6IjcwNjQxMjY3NzMwMzM1NzI5MDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4a3b3cee54993dd56ae0587a2f57c61251dc50c1c45ffee1f49e83ec2c2662d7 |
| hovercard-subject-tag | issue:1332660189 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-bigquery/1307/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c392aeadec715b7beed8d340d907c0fdc9538a5595d34dac6430cc7669e4dc15/googleapis/python-bigquery/issues/1307 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c392aeadec715b7beed8d340d907c0fdc9538a5595d34dac6430cc7669e4dc15/googleapis/python-bigquery/issues/1307 |
| og:image:alt | Hi, when using this package on my local machine I have no issues, however when deploying to our serverless environment in an AWS lambda we get the error seen at the bottom of this issue. We have tr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dionearle |
| hostname | github.com |
| expected-hostname | github.com |
| None | d0525ab1464526bf4532a5551aa348cf100dff75ef808a96fc67a08b1d946aa9 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-bigquery git https://github.com/googleapis/python-bigquery.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992475 |
| octolytics-dimension-repository_nwo | googleapis/python-bigquery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992475 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-bigquery |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fef3993a71fa20f7be8e167132fbf9619bc66e12 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width