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

'dataset' suddenly stopped working with 'ISLR' #117

Open
compleathorseplayer opened this issue Mar 5, 2021 · 11 comments · May be fixed by #119
Open

'dataset' suddenly stopped working with 'ISLR' #117

compleathorseplayer opened this issue Mar 5, 2021 · 11 comments · May be fixed by #119

Comments

@compleathorseplayer
Copy link

I teach a class using ISLR, helped by the RDatasets package, which has worked fine this semester so far, until in the past few days, it suddenly stopped working for my students. For all the invocations of

datasets("ISLR","<dataset>")

They are getting

Error encountered while load FileIO.File{.....   
Fatal error....
load not defined

I emphasise that these were scripts that worked fine before, and suddenly just stopped working.

Does anyone have any ideas as to why this might be happening and how one might fix it?

@elrond3000
Copy link

I suppose I have a similar problem. I tried to execute iris = dataset("datasets", "iris") just after add RDatasets and the same error appear.

Error encountered while load FileIO.File{FileIO.DataFormat{:GZIP},String}("/home/elrond/.julia/packages/RDatasets/99YUH/src/../data/datasets/iris.rda").

Fatal error:
ERROR: UndefVarError: load not defined

but neuro = dataset("boot", "neuro") works well.
Here is my versioninfo() output

Julia Version 1.5.3
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
  JULIA_PKG_SERVER = https://mirrors.tuna.tsinghua.edu.cn/julia

@compleathorseplayer
Copy link
Author

Thanks. Students seem to suddenly have this problem even on (ISLR) datasets which have previously worked fine with exactly the same syntax

@devmotion
Copy link
Member

I assume this is caused by FileIO 1.6.0 which was a major rewrite of FileIO (but supposed to be non-breaking - maybe RDatasets uses some internals of FileIO?). Downgrading to FileIO 1.5 fixed e.g. problems with CairoMakie for me (MakieOrg/Makie.jl#864).

@torfjelde
Copy link

Can confirm your solution works @devmotion ❤️

@devmotion
Copy link
Member

BTW since I haven't investigated what the actual problem is I am not sure if it is a problem of RDatasets or rather of RData.

@devmotion
Copy link
Member

The error message that I get when running the iris example is similar to JuliaData/RData.jl#57 - maybe it's related to the gzip problem mentioned therein? Maybe uncompressed datasets work fine with FileIO 1.6 but compressed ones stopped working?

@devmotion devmotion linked a pull request Mar 6, 2021 that will close this issue
timholy added a commit to JuliaIO/FileIO.jl that referenced this issue Mar 7, 2021
timholy added a commit to JuliaIO/FileIO.jl that referenced this issue Mar 7, 2021
@timholy
Copy link

timholy commented Mar 7, 2021

Really sorry about this, and especially about messing up your class, @compleathorseplayer. Calling it FileIO 1.6 rather than FileIO 2.0 seems to be one of the biggest Julia mistakes I've ever made. I thought I had so cleverly made the rewrite backwards-compatible.

This should be fixed in FileIO 1.6.1. For the interested, there's a more detailed explanation in JuliaIO/FileIO.jl#308 (comment). That said, the solution in #119 is worth considering independently on its own merits.

@compleathorseplayer
Copy link
Author

Thanks, Tim. If students re-install RDatasets, will this automatically be fixed now? If not (assuming some of them are barely computer-literate) what is the easiest way to fix this?

@timholy
Copy link

timholy commented Mar 7, 2021

All they should have to do is pkg> up. If it upgrades to FileIO 1.6.1, all is good.

@compleathorseplayer
Copy link
Author

Thanks for that. I don't know if they want to upgrade everything (at this point, I don't want to risk other new bugs!). How do they just upgrade this package?

@timholy
Copy link

timholy commented Mar 7, 2021

I can understand that! 😅

Nominally Pkg.update(pkgname) should work, but for me it usually seems to update lots of things, not just what I asked for. I'm not sure what's going on there, that might merit a specific inquiry.

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

Successfully merging a pull request may close this issue.

5 participants