no slot of name "elementMetadata" for this object of class "SummarizedExperiment"

I have a count table that was saved as an .rda file. I was always able to open the .rda file in R simply using load("myData.rda"). Recently, upon trying to open the same file, I received an error in R as follows:

Error in nrow(x@elementMetadata) :
no slot of name "elementMetadata" for this object of class "SummarizedExperiment"

Even though this error is output, loading in the data does create the countTable
object in the R session. When I do:

slotNames(countTable)

I get five answers:

[1] "colData" "assays" "NAMES" "elementMetadata" "metadata"

Since that include "elementMetadata" and since I was always able to read in this file, I am confused what may be causing this. My R session information is as follows:

That simply means that SummarizedExperiment had its definition changed recently and your variable doesn't have the new slot because it was created before the new definition was in existence. You can use updateObject to easily make your variable conform to the latest definition.