Unsupported type for timedelta seconds component

See original GitHub issue

I’m getting the following error when updating to version 5.1.0. Version 5.0.0 works without problems:

TypeError: unsupported type for timedelta seconds component: datetime.timedelta
Screen Shot 2022-04-05 at 23 10 36

Settings:

SIMPLE_JWT = {
    'SIGNING_KEY': SECRET_KEY,
    'ACCESS_TOKEN_LIFETIME': timedelta(minutes=30),
    'REFRESH_TOKEN_LIFETIME': timedelta(days=15),
    'LEEWAY': timedelta(minutes=2),
    'AUTH_HEADER_TYPES': ('JWT',),
    'USER_ID_FIELD': 'id',
    'USER_ID_CLAIM': 'user_id',
    'ROTATE_REFRESH_TOKENS': True, # Rotate the tokens to allow infinite refresh lifetime.
    'BLACKLIST_AFTER_ROTATION': True, # Invalidate refresh token when it is used and rotated.
}

Not using a seconds unit anywhere…

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
toniengelhardtcommented, May 20, 2022

No problem @Andrew-Chen-Wang, thanks a ton!

1reaction
Andrew-Chen-Wangcommented, May 20, 2022

apologies, I should probably make a release with all these fixes. I’ve been swamped lately, so either this weekend but mostly likely next. Sorry and thanks for the patience!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: unsupported type for timedelta days component
I am trying to perform some date arithmetic in a function. from datetime import datetime ...
Read more >
unsupported type for timedelta seconds component: str ...
When creating hashed indexes, throws: TypeError: unsupported type for timedelta seconds component: str.
Read more >
Tutorial 13 - unsupported type for timedelta seconds ... - GitHub
Hi, First great tutorial but im stuck with the spotify authentication. for some reason when he redirects it says /spotify/util.py line 22 in ......
Read more >
TypeError: unsupported type for timedelta microseconds ...
I have a new installation of Trac 0.12. I am using MySQLdb 1.2.3. 2011-07-25 21:47:28,034 Trac[main] ERROR: Internal Server Error: Traceback (most recent ......
Read more >
datetime: timedelta(minutes = i) silently fails with numpy.int32 ...
testing with 2.6 and numpy 1.3 already :: timedelta(seconds = int32(36)) TypeError: unsupported type for timedelta seconds component: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found