Title: Missing pytz dependency · Issue #468 · googleapis/python-pubsub · GitHub
Open Graph Title: Missing pytz dependency · Issue #468 · googleapis/python-pubsub
X Title: Missing pytz dependency · Issue #468 · googleapis/python-pubsub
Description: Environment details OS type and version: macOS 11.4 Python version: 3.8.2 pip version: 21.1.3 google-cloud-pubsub version: 2.7.0 Steps to reproduce Install google-cloud-pubsub, e.g. pipenv install --python 3.8 google-cloud-pubsub. Run co...
Open Graph Description: Environment details OS type and version: macOS 11.4 Python version: 3.8.2 pip version: 21.1.3 google-cloud-pubsub version: 2.7.0 Steps to reproduce Install google-cloud-pubsub, e.g. pipenv install ...
X Description: Environment details OS type and version: macOS 11.4 Python version: 3.8.2 pip version: 21.1.3 google-cloud-pubsub version: 2.7.0 Steps to reproduce Install google-cloud-pubsub, e.g. pipenv install ...
Opengraph URL: https://github.com/googleapis/python-pubsub/issues/468
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing pytz dependency","articleBody":"#### Environment details\r\n\r\n - OS type and version: macOS 11.4\r\n - Python version: 3.8.2\r\n - pip version: 21.1.3\r\n - `google-cloud-pubsub` version: 2.7.0\r\n\r\n#### Steps to reproduce\r\n\r\n 1. Install `google-cloud-pubsub`, e.g. `pipenv install --python 3.8 google-cloud-pubsub`.\r\n 2. Run code below.\r\n\r\n#### Code example\r\n\r\n```python\r\nfrom concurrent.futures import TimeoutError\r\nfrom typing import Callable\r\n\r\nfrom google.cloud.pubsub_v1 import SubscriberClient\r\nfrom google.cloud.pubsub_v1.types import PubsubMessage\r\n\r\n\r\ndef process_messages(\r\n project_id: str,\r\n subscription_id: str,\r\n callback: Callable[[PubsubMessage], None],\r\n timeout: int = 5,\r\n) -\u003e None:\r\n subscriber = SubscriberClient()\r\n subscription_path = subscriber.subscription_path(project_id, subscription_id)\r\n streaming_pull_future = subscriber.subscribe(subscription_path, callback=callback)\r\n with subscriber:\r\n try:\r\n streaming_pull_future.result(timeout=timeout)\r\n except TimeoutError:\r\n streaming_pull_future.cancel() # Trigger the shutdown.\r\n streaming_pull_future.result() # Block until the shutdown is complete.\r\n\r\n\r\nif __name__ == \"__main__\":\r\n process_messages(\"my-project\", \"my-sub\")\r\n\r\n```\r\n\r\n#### Stack trace\r\n```\r\nTraceback (most recent call last):\r\n File \"loaders.py\", line 4, in \u003cmodule\u003e\r\n from google.cloud.pubsub_v1 import SubscriberClient\r\n File \"/Users/tomphillips/.local/share/virtualenvs/loaders-emkxO8nx/lib/python3.8/site-packages/google/cloud/pubsub_v1/__init__.py\", line 19, in \u003cmodule\u003e\r\n from google.cloud.pubsub_v1 import subscriber\r\n File \"/Users/tomphillips/.local/share/virtualenvs/loaders-emkxO8nx/lib/python3.8/site-packages/google/cloud/pubsub_v1/subscriber/__init__.py\", line 17, in \u003cmodule\u003e\r\n from google.cloud.pubsub_v1.subscriber.client import Client\r\n File \"/Users/tomphillips/.local/share/virtualenvs/loaders-emkxO8nx/lib/python3.8/site-packages/google/cloud/pubsub_v1/subscriber/client.py\", line 26, in \u003cmodule\u003e\r\n from google.cloud.pubsub_v1.subscriber._protocol import streaming_pull_manager\r\n File \"/Users/tomphillips/.local/share/virtualenvs/loaders-emkxO8nx/lib/python3.8/site-packages/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py\", line 35, in \u003cmodule\u003e\r\n import google.cloud.pubsub_v1.subscriber.message\r\n File \"/Users/tomphillips/.local/share/virtualenvs/loaders-emkxO8nx/lib/python3.8/site-packages/google/cloud/pubsub_v1/subscriber/message.py\", line 20, in \u003cmodule\u003e\r\n import pytz\r\nModuleNotFoundError: No module named 'pytz'\r\n```","author":{"url":"https://github.com/tomwphillips","@type":"Person","name":"tomwphillips"},"datePublished":"2021-08-10T12:46:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/468/python-pubsub/issues/468"}
| 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:59cd1e09-238d-9521-6264-53823815faea |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C122:2B01A0:1C53047:29317B7:6A4E5FCE |
| html-safe-nonce | 13177c239a93da2541e077e36cc05110c31878a6e749b527d0fc931e945431a4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTIyOjJCMDFBMDoxQzUzMDQ3OjI5MzE3Qjc6NkE0RTVGQ0UiLCJ2aXNpdG9yX2lkIjoiNzI1NTUyNzUzMjM5MjI0MzE1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e1bc6ddee4b0fc7e7300e655ce202b4077daba69f98a306832dadde601600932 |
| hovercard-subject-tag | issue:964944937 |
| 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-pubsub/468/issue_layout |
| twitter:image | https://opengraph.githubassets.com/49a3e27eaa5bb25b248401578b07d0fc827181836a5ce7e35730ab227628acef/googleapis/python-pubsub/issues/468 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/49a3e27eaa5bb25b248401578b07d0fc827181836a5ce7e35730ab227628acef/googleapis/python-pubsub/issues/468 |
| og:image:alt | Environment details OS type and version: macOS 11.4 Python version: 3.8.2 pip version: 21.1.3 google-cloud-pubsub version: 2.7.0 Steps to reproduce Install google-cloud-pubsub, e.g. pipenv install ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tomwphillips |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-pubsub git https://github.com/googleapis/python-pubsub.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992581 |
| octolytics-dimension-repository_nwo | googleapis/python-pubsub |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992581 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-pubsub |
| 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 | 55abf6b50233e48592f2087d3226df604c65feb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width