Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

r-base cannot read CRAN archive.rds, but rocker/r-ver can #344

Open
pjbulls opened this issue Jul 18, 2019 · 6 comments
Open

r-base cannot read CRAN archive.rds, but rocker/r-ver can #344

pjbulls opened this issue Jul 18, 2019 · 6 comments

Comments

@pjbulls
Copy link

pjbulls commented Jul 18, 2019

I was trying to query the CRAN archive.rds metadata as follows:

meta <- paste0(contrib.url(getOption("repos"), "source"), "/Meta/archive.rds")
con <- gzcon(url(meta, "rb"))
readRDS(con)

This works fine on many different combinations of R and OS, but in the r-base:3.5.2 Docker image it results in the following:

Error in readRDS(con) : embedded nul in string: '\004\0\t\0\0\0'

The rocker/r-ver:3.5.2 image is not affected and can read the connection without any issue. Is there an explanation for this?

@eddelbuettel
Copy link
Member

Are you aware of the differences in rds format introduced in R 3.6.0? Are you possibly just running against that?

@eddelbuettel
Copy link
Member

It's is something else. Maybe they added / turned off compression. I can read it fine with a 3.5.0 rocker but not with a 3.6.0 rocker or my normal 3.6.1 session.

Does not strike me as a Rocker issue.

@pjbulls
Copy link
Author

pjbulls commented Jul 19, 2019

To be clear, this only occurs on the r-base image, not r-ver or its children. It also makes no difference which repository/mirror is queried (CRAN, MRAN snapshots...). So yes, it's an issue with r-base specifically, but I believe that is also maintained here?

@eddelbuettel
Copy link
Member

eddelbuettel commented Jul 19, 2019

Sure, I maintain base. I still don't understand the issue or why it matters. What is relevant is that your code example does not work either for on current R (in a normal shell) nor for a recent r-base aka rocker/r-base image. Hence I suspect we are missing something else but I don't know what.

@pjbulls
Copy link
Author

pjbulls commented Jul 19, 2019

Well, that's weird, because for me it works on the following R, OS and repositories:

R 3.5.2 on Windows 10 in RStudio ( https://cran.rstudio.com/ )
R 3.6.1 on Debian Stretch in base R ( https://cloud.r-project.org/ )
R 3.5.2 in the rocker/rstudio image ( https://mran.microsoft.com/snapshot/2019-03-11/ )
R 3.5.2 in the rocker/r-ver image ( all of the above )

The error only occurs in r-base:3.5.2, regardless of repository. Using r-ver instead of r-base is a valid fix for me, but this has me somewhat worried over what the underlying differences are since I am trying to get my setup as reproducible as possible, and it seems that one R 3.5.2 does not equal the other.

@eddelbuettel
Copy link
Member

Well maybe R 3.5.2 is hosed?

At the end of the I am not sure I care all that much as current r-base is 3.6.1. Which appears to work.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants