Title: pendulum.now() returning None when executed via Slurm · Issue #989 · python-pendulum/pendulum · GitHub
Open Graph Title: pendulum.now() returning None when executed via Slurm · Issue #989 · python-pendulum/pendulum
X Title: pendulum.now() returning None when executed via Slurm · Issue #989 · python-pendulum/pendulum
Description: [ x] I am on the latest Pendulum version. [ x] I have searched the issues of this repo and believe that this is not a duplicate. OS version and name: RHEL8 ( 4.18.0-553.132.1.el8_10.x86_64) Pendulum version: 3.2.0 Issue I've encountered ...
Open Graph Description: [ x] I am on the latest Pendulum version. [ x] I have searched the issues of this repo and believe that this is not a duplicate. OS version and name: RHEL8 ( 4.18.0-553.132.1.el8_10.x86_64) Pendulu...
X Description: [ x] I am on the latest Pendulum version. [ x] I have searched the issues of this repo and believe that this is not a duplicate. OS version and name: RHEL8 ( 4.18.0-553.132.1.el8_10.x86_64) Pendulu...
Opengraph URL: https://github.com/python-pendulum/pendulum/issues/989
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pendulum.now() returning None when executed via Slurm","articleBody":"\u003c!--\n Hi there! Thank you for discovering and submitting an issue.\n\n Before you submit this; let's make sure of a few things.\n Please make sure the following boxes are ticked if they are correct.\n If not, please try and fulfill these first.\n-->\n\n\u003c!-- Checked checkbox should look like this: [x] -->\n- [ x] I am on the [latest](https://github.com/sdispater/pendulum/releases/latest) Pendulum version.\n- [ x] I have searched the [issues](https://github.com/sdispater/pendulum/issues) of this repo and believe that this is not a duplicate.\n\n\u003c!--\n Once those are done, if you're able to fill in the following list with your information,\n it'd be very helpful to whoever handles the issue.\n-->\n\n- **OS version and name**: RHEL8 ( 4.18.0-553.132.1.el8_10.x86_64) \n- **Pendulum version**: 3.2.0 \n\n## Issue\nI've encountered an odd issue after the team recently upgraded pendulum for our utilities. One of our tools does a simple time tracking calculation of the form: \n\nstart=pendulum.now() \n....\ntime_diff = pendulum.now() - start_time\n\nThe later line generated a type error: \n\nTraceback (most recent call last):\n File \"/users/vlapipe/workflows/dsoc-prod/bin/mr_books\", line 8, in \u003cmodule>\n sys.exit(mr_books())\n File \"/users/vlapipe/workflows/dsoc-prod/lib/python3.10/site-packages/pyat/mr_books/commands.py\", line 594, in mr_books\n mb.run()\n File \"/users/vlapipe/workflows/dsoc-prod/lib/python3.10/site-packages/pyat/mr_books/commands.py\", line 534, in run\n time_diff = pendulum.now() - start_time\n File \"/users/vlapipe/workflows/dsoc-prod/lib/python3.10/site-packages/pendulum/datetime.py\", line 1215, in __sub__\n return other.diff(self, False)\n File \"/users/vlapipe/workflows/dsoc-prod/lib/python3.10/site-packages/pendulum/datetime.py\", line 712, in diff\n return Interval(self, dt, absolute=abs)\n File \"/users/vlapipe/workflows/dsoc-prod/lib/python3.10/site-packages/pendulum/interval.py\", line 185, in __init__\n self._delta: PreciseDiff = precise_diff(_start, _end)\nTypeError: 'NoneType' object cannot be cast as 'str'\n\nBut only when the utility was run on via slurm. Any hand execution of the utility returned without error. This may be related to issue #905 , since the error disappeared once the now() calls were provided an explicit timezone (pendulum.now('UTC')). \n\nIt seems as though now() was missing critical timezone information in the limited environment of cluster execution via Slurm, which was provided in by a standard login. \n","author":{"url":"https://github.com/jsheckar","@type":"Person","name":"jsheckar"},"datePublished":"2026-07-27T20:51:26Z","url":"https://github.com/python-pendulum/pendulum/issues/989"}
| 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:f6b17745-1c95-94da-aeed-966f7d601a62 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B6C4:AF327:1209AA:18FE1D:6B046474 |
| html-safe-nonce | 54f6c2d593b9376ce75ab6fa9d7575a113e9a671646de1d64bb83726f618510d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkM0OkFGMzI3OjEyMDlBQToxOEZFMUQ6NkIwNDY0NzQiLCJ2aXNpdG9yX2lkIjoiMzYwMTgyNzIzNDg0MDg2Mzg2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1d64032e03acf23ae19b210c6b998fdc6f52b641320f1d648960da056c28f462 |
| hovercard-subject-tag | issue:4992223896 |
| 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-pendulum/pendulum/989/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7f5a5c95b23840833adfd677e7eedd0ff1fa75245a4c524d63cc8e7bcd278f40/python-pendulum/pendulum/issues/989 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7f5a5c95b23840833adfd677e7eedd0ff1fa75245a4c524d63cc8e7bcd278f40/python-pendulum/pendulum/issues/989 |
| og:image:alt | [ x] I am on the latest Pendulum version. [ x] I have searched the issues of this repo and believe that this is not a duplicate. OS version and name: RHEL8 ( 4.18.0-553.132.1.el8_10.x86_64) Pendulu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jsheckar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-pendulum/pendulum git https://github.com/python-pendulum/pendulum.git |
| octolytics-dimension-user_id | 191041900 |
| octolytics-dimension-user_login | python-pendulum |
| octolytics-dimension-repository_id | 62095504 |
| octolytics-dimension-repository_nwo | python-pendulum/pendulum |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 62095504 |
| octolytics-dimension-repository_network_root_nwo | python-pendulum/pendulum |
| 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 | 03e114520787ad27289207f153520ef97461127c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width