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

Collect(<youtube>) and Collect(<thread.reddit>) throw an error in R4.4.0: object 'collect_log' not found #56

Closed
sbinn opened this issue May 22, 2024 · 4 comments
Labels
bug Something isn't working reddit Related to reddit

Comments

@sbinn
Copy link

sbinn commented May 22, 2024

On R 4.4.0 with vosonSML 0.34.2, Collect(<youtube>) and Collect(<thread.reddit>) throw the errors below, respectively:

Error in Collect.youtube(yt_auth, videoIDs = video_url, maxComments = 500, :
object 'collect_log' not found

Error in Collect.thread.reddit(Authenticate("reddit"), threadUrls = thread_urls, :
object 'collect_log' not found

Sample:

# YouTube Data Collection --------------------------------------------------
library(vosonSML)
my_api_key <- "XXX"
yt_auth <- Authenticate("youtube", apiKey = my_api_key)
video_url <- c("https://www.youtube.com/watch?v=jNQXAC9IVRw")
yt_data <- yt_auth |> Collect(videoIDs = video_url,
                              maxComments = 500,
                              writeToFile = TRUE,
                              verbose = TRUE) 

# Reddit Data Collection --------------------------------------------------
thread_urls <- c(
  "https://www.reddit.com/r/AusFinance/comments/ymkrlr/",
  "https://www.reddit.com/r/AusFinance/comments/ugetai/")
rd_data <- Authenticate("reddit") |>  
  Collect(threadUrls = thread_urls,
          sort = "best", 
          waitTime = c(6, 8),
          writeToFile = TRUE, 
          verbose = TRUE) 
@bryn-g bryn-g added bug Something isn't working reddit Related to reddit labels May 25, 2024
bryn-g added a commit that referenced this issue May 25, 2024
This is to address issue #56 .
@bryn-g
Copy link
Member

bryn-g commented May 25, 2024

Thanks @sbinn, this appears to be a new issue with R 4.4 and S3 classes and/or global variables as used with the metadata logging. It does not occur under R 4.3.

I've disabled the writeToFile metadata logging in vosonSML 0.34.3 commit d19d0a5 for the time being until the issue is determined and solved. You may still encounter the problems I have with Issue #58.

@sbinn
Copy link
Author

sbinn commented Jun 14, 2024

Thanks for the commit. For YouTube, vosonSML 0.34.3 on R 4.4.0 fixes the issue for the Collect() function. However, it throws an error when trying to create an igraph object from a vosonSML network object:

Error in Graph.actor.youtube(yt_actor_network) : object 'g' not found

Sample (continuing example from above):

yt_actor_network <- yt_data |> Create("actor") |> Graph()

The error does not occur when using vosonSML 0.34.3 on R 4.3.2 or R 4.3.3.

Not tested for Reddit due to Issue #58 .

@rjackland
Copy link
Collaborator

@bryn-g already knows this, but I got the same as what @sbinn found: I also got the "object 'g' not found" error for vosonSML 0.34.3 on R 4.4.1 on Ubuntu 22.04, but it works fine with R 4.3.3

@bryn-g
Copy link
Member

bryn-g commented Jul 21, 2024

Error is fixed in 5fa70dc.

@bryn-g bryn-g closed this as completed Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reddit Related to reddit
Projects
None yet
Development

No branches or pull requests

3 participants