question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] - EmptyResponseError

See original GitHub issue

Read Below!!! If this doesn’t fix your issue delete these two lines

You may need to install chromedriver for your machine globally. Download it here and add it to your path.

Describe the bug

A clear and concise description of what the bug is.

The buggy code from TikTokApi import TikTokApi import random api = TikTokApi.get_instance() custom_did = str(random.randint(10000, 999999999))

results = 2

Since TikTok changed their API you need to use the custom_verifyFp option.

In your web browser you will need to go to TikTok, Log in and get the s_v_web_id value.

#trending = api.trending(count=results, custom_verifyFp=“”) hashtag_videos = api.byHashtag(‘covid’, count=1, custom_did=custom_did, custom_verifyFp=‘verify_kidz7cgg_Qyz7RECI_o3vI_4fjk_BDCA_uPzl1O1jjQVX’)

for tiktok in hashtag_videos: data = api.get_Video_By_TikTok(tiktok,custom_did=custom_did,custom_verifyFp=‘verify_kidz7cgg_Qyz7RECI_o3vI_4fjk_BDCA_uPzl1O1jjQVX’) print(tiktok) with open(“test.mp4”, ‘wb’) as o: o.write(data) print(‘success’) Please insert the code that is throwing errors or is giving you weird unexpected results.

# Code Goes Here

Expected behavior

A clear and concise description of what you expected to happen.

Error Trace (if any)

Put the error trace below if there’s any error thrown.

# Error Trace Here

image

Desktop (please complete the following information):

  • OS: [e.g. Windows 10]
  • TikTokApi Version [e.g. 3.3.1] - 3.8.5

Additional context

Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
novemberdudecommented, Dec 18, 2020

Hey everyone, I also got the empty response error, and in the tiktok.py file, I change BASE_URL = "https://m.tiktok.com/" to BASE_URL = "https://t.tiktok.com/" and it works!

0reactions
davidteathercommented, Dec 20, 2020

Hey everyone, I also got the empty response error, and in the tiktok.py file, I change BASE_URL = "https://m.tiktok.com/" to BASE_URL = "https://t.tiktok.com/" and it works!

Which is what TikTokApi.get_instance(use_test_endpoints=True) should do

Read more comments on GitHub >

github_iconTop Results From Across the Web

AMQ::Protocol::EmptyResponseError: Empty response ...
I'm constantly getting this error in one of the workers. And the error is getting repeated only for a particular queue.
Read more >
1302362 – IPv6 RabbitMQ connection shows periodic ...
Bug 1302362 - IPv6 RabbitMQ connection shows periodic Exception in the reader loop: AMQ::Protocol::EmptyResponseError: Empty response received from the ...
Read more >
Protocol::EmptyResponseError in my heardbeat threads
"Exception in the reader loop: AMQ::Protocol::EmptyResponseError: Empty response received from the server." It retries and then works just fine, ...
Read more >
How To Fix Err_empty_response: Try These Simple Tips
It's possible that you're getting the ERR EMPTY RESPONSE error because your network connection is down. To begin, double-check that your ...
Read more >
Exception: AMQ::Protocol::EmptyResponseError - RubyDoc.info
A new instance of EmptyResponseError. Methods inherited from Error · [], inherited, subclasses_with_values. Constructor Details ...
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