Skip to content

TypeError in RateLimiter: unsupported operand type(s) for -: 'int' and 'datetime.timedelta' #189

@mkandel-lockself

Description

@mkandel-lockself

Bug Summary

When the rate limiter is triggered (more than 5 requests per second), a TypeError is raised in limiter.py.

Steps to Reproduce

  1. Make multiple API calls in quick succession (>5 requests/second)
  2. The rate limiter triggers and attempts to calculate wait time
  3. TypeError is raised

Expected Behavior

The rate limiter should calculate the wait time correctly and pause execution until the next request is allowed, without raising any exception.

Actual Behavior

When making multiple API calls in quick succession, the SDK crashes with the following error:

TypeError: unsupported operand type(s) for -: 'int' and 'datetime.timedelta'

Project Version

0.38.1

Environment Info

Python version: 3.14

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions