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

Error in getting trends [Mac OS] #31

Open
graalume opened this issue Dec 4, 2020 · 4 comments
Open

Error in getting trends [Mac OS] #31

graalume opened this issue Dec 4, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@graalume
Copy link

graalume commented Dec 4, 2020

Hey there, I've been trying to get a tonne of trend data so I've been running

trends <- tk_posts(scope = trends, n = 6000)

I was setting n super high because it kept on returning duplicated data so if n was set to 200 I only got 50 unique videos back. It was working until just a few minutes ago and now I'm just getting the following message:

Error in if (out$statusCode == "10219") { : argument is of length zero

I noticed this was similar to another closed issue but it looked like it was resolved for the user who made the issue with a patch from two weeks ago.

Any ideas?

@benjaminguinaudeau
Copy link
Owner

Hi,

First, you won't get more than 2000 with the trend endpoint. This is the limit set by Tiktok.

The error is a bug in the code. I've just merged the dev branch and this should be solved. Can you try to reinstall the package and let me know if the error persists.

Sorry for the inconvenience.

@graalume
Copy link
Author

graalume commented Dec 4, 2020

Awesome! Thank you! And thanks for responding so fast!

@benjaminguinaudeau
Copy link
Owner

Thank YOU for sharing the bug! It's really helpful! ;)

@favstats favstats added the bug Something isn't working label Dec 4, 2020
@lucacarbonelc
Copy link

Hello, thank you for the great work, the package looks great!:)

I've had a couple of problems as well related to this. Retrieving trends, with
tk_posts(scope = "trends", n = 2)
the R session aborts, independently on n.

When retrieving hashtags, I get this error:

Error in get_data(url, ...) : 
  empty response : request was blocked by tiktok

And when retrieving users, I get this error:

Error: lexical error: invalid char in json text.
                                      {statusCode: 0,body: {userData: 
                     (right here) ------^

Any ideas on how to solve these issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants