-
Notifications
You must be signed in to change notification settings - Fork 130
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 stopifnot(is.character(filename), length(filename) == 1L) : reached elapsed time limit #1566
Comments
@catalamarti it seems the problem comes from this line Line 11 in 6f5c3af
To fix in the case above we can add str.myclass to avoid hitting str.tbl_df myclassConstructor <- function(x) {
class(x) <- "myclass"
return(x)
}
`[[.myclass` <- function(x, name) {
x_raw <- unclass(x)
tbl <- x_raw[[name]]
attr(tbl, "reference") <- x
return(tbl)
}
myElement <- tibble::tibble(a = 1)
# warning
for(i in 1:5){
obj <- myclassConstructor(x = list("element" = myElement))
}
str.myclass <- function(){
print("no problems now")
}
# no warning
for(i in 1:5){
obj <- myclassConstructor(x = list("element" = myElement))
} Created on 2023-12-19 with reprex v2.0.2 |
@krlmlr I´m not sure if this issue should be closed as is or if some input validation can be added to str.tbl_df (it took some digging to work out what was going on)? |
AFAICT - the issue is not triggered by Your likely seeing the error message due to something your editor is running internally to inspect the code on screen. You can trigger it directly calling If you do want |
Hi team,
We've built some packages on top of tibble and the tidyverse and we are facing a weird error/warning.
It is displayed as an error, but is does not prevent us to use the function. In fact the error does not appear in the reprex (see reprex and image) as I guess it is more a message than an error.
The error message does not appear if we unclass or use a data.frame.
reprex:
Created on 2023-12-18 with reprex v2.0.2
image with the error:
The text was updated successfully, but these errors were encountered: