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

slot "subclasses" from an object of a basic class ("NULL") with no slots" on Mac occasionally just happens #1077

Closed
aleighbrown opened this issue Dec 12, 2022 · 3 comments

Comments

@aleighbrown
Copy link

This error keeps happening to me occasioanlly and now seems to persist. I cannot load 'tidyverse' due to an error with dbplyr

I've seen this error before #779 and had previously resolved by devtools::install_github("RobinHankin/Brobdingnag)"

However, for whatever reason it's not working this time

I have reinstalled from GitHub the Brobdingnag, dplyr, and tidyverse packages. Restarted my R, restarted my computer

> library(tidyr)

Attaching package:tidyrThe following objects are masked frompackage:Matrix:

    expand, pack, unpack

> library(magrittr)

Attaching package:magrittrThe following object is masked frompackage:tidyr:

    extract

> library(dbplyr)
Error in completeSubclasses(classDef2, class1, obj, where) : 
  trying to get slot "subclasses" from an object of a basic class ("NULL") with no slots
Error: package or namespace load failed fordbplyr:
 .onLoad failed in loadNamespace() for 'dbplyr', details:
  call: setClass(cl, contains = c(prevClass, "VIRTUAL"), where = where)
  error: error in contained classes ("character") for classident”; class definition removed fromdbplyr

Version info

platform       x86_64-apple-darwin17.0     
arch           x86_64                      
os             darwin17.0                  
system         x86_64, darwin17.0          
status                                     
major          4                           
minor          2.1                         
year           2022                        
month          06                          
day            23                          
svn rev        82513                       
language       R                           
version.string R version 4.2.1 (2022-06-23)
nickname       Funny-Looking Kid     
@mgirlich
Copy link
Collaborator

Sorry, this is not a dbplyr issue and there is nothing we can do about it. It might be due to another package you have installed. You could have a look at this issue from Brobdingnag to find other packages that might cause this.
Or you could try to figure out which package is responsible for this, maybe by adapting this reprex from Hadley

requireNamespace("Brobdingnag")
#> Loading required namespace: Brobdingnag
requireNamespace("Matrix")
#> Loading required namespace: Matrix
methods::setOldClass(c("ident", "character"))
#> Error in completeSubclasses(classDef2, class1, obj, where) : 
#>   trying to get slot "subclasses" from an object of a basic class ("NULL") with no slots
#> Error in setClass(cl, contains = c(prevClass, "VIRTUAL"), where = where): error in contained classes ("character") for class "ident"; class definition removed from '.GlobalEnv'

and replacing Brobdingnag by other packages you have installed. Though, I can't promise you can figure it out like this.

@hadley In the other issue you mentioned a fix to R

I pinged Michael Lawrence about this and he also pushed a fix to R-devel: wch/r-source@3d97199

Do you know when/whether this is going to happen? I didn't find anything in the R changelog.

@mgirlich
Copy link
Collaborator

Closing this because it is not a dbplyr issue. Sorry we couldn't help you.

@lanjlgle
Copy link

lanjlgle commented May 22, 2023

I also encountered this error, but only when I open a rstudio project which had been created before, nor a newly created project or a new R session.

Then, I guess some objects related to dbplyr may be loaded from '.RData'. If I add "library(dbplyr)" into file 'Rprofile.site', the error never occur any more. Hope helps.

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