Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignatureRateLimitError missing _response attribute in TikTokLive error object #306

Open
janes-r opened this issue Mar 7, 2025 · 1 comment
Assignees

Comments

@janes-r
Copy link

janes-r commented Mar 7, 2025

/### Description:
When attempting to start the TikTok client, I encounter a SignatureRateLimitError that causes an AttributeError because the error object is missing the _response attribute. This error prevents the client from connecting when the rate limit is exceeded.

Error Message:

Failed to start TikTok client due to unexpected error: 'SignatureRateLimitError' object has no attribute '_response'

Expected Behavior:

The error object should either include a _response attribute or the error handling should be updated so that accessing this attribute does not raise an AttributeError.

Steps to Reproduce:

Install TikTokLive (e.g., version 6.4.4) using pip.
Create a TikTokLiveClient instance with a valid unique ID (username).
Call await client.start() when the TikTok API rate limits the connection.
Observe that a SignatureRateLimitError is raised, and when the library tries to access _response, an AttributeError occurs.

Environment:

TikTokLive version: 6.4.4
Python version: 3.10
Operating System: (Windows 10)

Additional Details:

This issue appears to occur during rate limiting scenarios.
I have not modified any TikTokLive library code.

Additional Context:

The error may be due to stricter rate limits imposed by TikTok or a regression in error handling within the library. I’m currently handling this error in my integration code, but a fix in the library itself would allow for more graceful error handling.

Suggested Fix:

Consider modifying the error handling in the SignatureRateLimitError class (located in TikTokLive/client/errors.py) to ensure that the error object either provides the _response attribute or handles its absence gracefully.

@isaackogan
Copy link
Owner

Thank you for the detailed report.

I am in the process of updating the library with the complete Protobuf of the TikTok Android App. When that is complete, I will also include a fix for this in the next release. If you'd like it sooner, I am happy to merge any PRs and publish an intermediate version to PyPi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants