Title: Unable to run `time.py` and `number.py` · Issue #140 · python-humanize/humanize · GitHub
Open Graph Title: Unable to run `time.py` and `number.py` · Issue #140 · python-humanize/humanize
X Title: Unable to run `time.py` and `number.py` · Issue #140 · python-humanize/humanize
Description: What did you do? I tried to run time.py and number.py but they failed. What did you expect to happen? Both time.py and number.py have shebangs so I expected they are runnable. What actually happened? Traceback (most recent call last): Fi...
Open Graph Description: What did you do? I tried to run time.py and number.py but they failed. What did you expect to happen? Both time.py and number.py have shebangs so I expected they are runnable. What actually happene...
X Description: What did you do? I tried to run time.py and number.py but they failed. What did you expect to happen? Both time.py and number.py have shebangs so I expected they are runnable. What actually happene...
Opengraph URL: https://github.com/python-humanize/humanize/issues/140
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to run `time.py` and `number.py` ","articleBody":"### What did you do?\r\n\r\nI tried to run `time.py` and `number.py` but they failed.\r\n\r\n### What did you expect to happen?\r\n\r\nBoth `time.py` and `number.py` have shebangs so I expected they are runnable.\r\n\r\n### What actually happened?\r\n```\r\nTraceback (most recent call last):\r\n File \"/tmp/humanize/src/humanize/time.py\", line 17, in \u003cmodule\u003e\r\n from .i18n import _gettext as _\r\nImportError: attempted relative import with no known parent package\r\n```\r\nand\r\n```\r\nTraceback (most recent call last):\r\n File \"/tmp/humanize/src/humanize/./number.py\", line 12, in \u003cmodule\u003e\r\n from .i18n import _gettext as _\r\nImportError: attempted relative import with no known parent package\r\n```\r\n\r\n### What versions are you using?\r\n\r\n* OS: Ubuntu 22.04.3 LTS\r\n* Python: Python 3.9.17\r\n* Humanize: main branch from git\r\n\r\nPlease include **code** that reproduces the issue.\r\n\r\n\r\n```bash\r\ngit clone https://github.com/python-humanize/humanize.git\r\ncd humanize/src/humanize/\r\n\r\nchmod +x time.py\r\n./time.py\r\n# and\r\nchmod +x number.py\r\n./number.py\r\n```\r\n","author":{"url":"https://github.com/marostelka","@type":"Person","name":"marostelka"},"datePublished":"2023-08-18T14:13:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/140/humanize/issues/140"}
| 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:38aa8c45-5208-73ab-a6fe-223f384f47c4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B44:262D17:FB306B:14F80C6:6A541AA8 |
| html-safe-nonce | eba4b8a47e328adfb41c3006373a76bd11dc51dc8328834b1b49c1ca2e9e5be4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjQ0OjI2MkQxNzpGQjMwNkI6MTRGODBDNjo2QTU0MUFBOCIsInZpc2l0b3JfaWQiOiI2ODEyODE0MDY3NDM2MzYyNDA4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 75810f9bfe09a946ab0fdfea4c8e7b3bc08dd064e9fa9a3e87e9cc004ebe1a11 |
| hovercard-subject-tag | issue:1856797051 |
| 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/python-humanize/humanize/140/issue_layout |
| twitter:image | https://opengraph.githubassets.com/22f2ad41472c88081a5ff7be23175f79987ea1d08ddef88434db1a1d59490e50/python-humanize/humanize/issues/140 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/22f2ad41472c88081a5ff7be23175f79987ea1d08ddef88434db1a1d59490e50/python-humanize/humanize/issues/140 |
| og:image:alt | What did you do? I tried to run time.py and number.py but they failed. What did you expect to happen? Both time.py and number.py have shebangs so I expected they are runnable. What actually happene... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | marostelka |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/python-humanize/humanize git https://github.com/python-humanize/humanize.git |
| octolytics-dimension-user_id | 62149795 |
| octolytics-dimension-user_login | python-humanize |
| octolytics-dimension-repository_id | 466683324 |
| octolytics-dimension-repository_nwo | python-humanize/humanize |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 466683324 |
| octolytics-dimension-repository_network_root_nwo | python-humanize/humanize |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width