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 message for get_all_comments() for videos without comments #113

Open
balthasars opened this issue Apr 13, 2021 · 3 comments
Open

Error message for get_all_comments() for videos without comments #113

balthasars opened this issue Apr 13, 2021 · 3 comments

Comments

@balthasars
Copy link
Contributor

balthasars commented Apr 13, 2021

Running get_all_comments() on videos that have received no comments throws this somewhat uninformative error:

get_all_comments("0ZyfSKT2ARk")
Error in `$<-.data.frame`(`*tmp*`, "parentId", value = NA) : 
  replacement has 1 row, data has 0
Called from: `$<-.data.frame`(`*tmp*`, "parentId", value = NA)

also happens here

get_all_comments("n2PRxx7xpao")
Error in `$<-.data.frame`(`*tmp*`, "parentId", value = NA) : 
  replacement has 1 row, data has 0
Called from: `$<-.data.frame`(`*tmp*`, "parentId", value = NA)

I'd suggest a message like "No comments available".

@soodoku
Copy link
Member

soodoku commented Apr 13, 2021

Thanks for this @balthasars --- I will take a look at this function later this week. As always, feel free to PR wherever you see a quick opportunity as time allows. Your contributions are much appreciated!

@balthasars
Copy link
Contributor Author

Thanks for this @balthasars --- I will take a look at this function later this week. As always, feel free to PR wherever you see a quick opportunity as time allows. Your contributions are much appreciated!

Thank you for your very swift reply 👍🏼
Your work is also much appreciated on my side! This one seems pretty low priority to be honest, just wanted to document it, tbh.

@beatrizvalfranco
Copy link

@balthasars how did you solve this problem in your code so the videos without comments are ignored?

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

3 participants