Something missing in Missings


#1

I think an update has just hosed Missings. On my system, stuff that I recalled having worked yesterday no longer seems to work.

on JuliaPro 0.6.2.1:

julia> using Missings;
INFO: Precompiling module Missings.
ERROR: LoadError: UndefVarError: IteratorSize not defined
Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:576
 [2] include(::String) at ./sysimg.jl:14
 [3] anonymous at ./<missing>:2
while loading /Applications/JuliaPro-0.6.2.1.app/Contents/Resources/pkgs-0.6.2.1/v0.6/Missings/src/Missings.jl, in expression starting on line 281
ERROR: Failed to precompile Missings to /Applications/JuliaPro-0.6.2.1.app/Contents/Resources/pkgs-0.6.2.1/lib/v0.6/Missings.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:710
 [2] _require(::Symbol) at ./loading.jl:463
 [3] require(::Symbol) at ./loading.jl:405

on Julia 0.6.2, Missings still compiles, but the example from https://en.wikibooks.org/wiki/Introducing_Julia/DataFrames now gives

julia> ptable = DataFrame(  Number       =   [1,   2,    6,    8,    26    ],
                            Name         =   ["Hydrogen",   "Helium",   "Carbon",   "Oxygen",   "Iron"   ],
                            AtomicWeight =   [1.0079,    4.0026,  12.0107, 15.9994, 55.845   ],
                            Symbol       =   ["H",    "He",    "C",    "O",  "Fe"  ],
                            Discovered   =   [1776,   1895,    0,    1774,    missing    ]);
julia> ptable[complete_cases(ptable),:]
5Γ—5 DataFrames.DataFrame
β”‚ Row β”‚ Number β”‚ Name       β”‚ AtomicWeight β”‚ Symbol β”‚ Discovered β”‚
β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1   β”‚ 1      β”‚ "Hydrogen" β”‚ 1.0079       β”‚ "H"    β”‚ 1776       β”‚
β”‚ 2   β”‚ 2      β”‚ "Helium"   β”‚ 4.0026       β”‚ "He"   β”‚ 1895       β”‚
β”‚ 3   β”‚ 6      β”‚ "Carbon"   β”‚ 12.0107      β”‚ "C"    β”‚ 0          β”‚
β”‚ 4   β”‚ 8      β”‚ "Oxygen"   β”‚ 15.9994      β”‚ "O"    β”‚ 1774       β”‚
β”‚ 5   β”‚ 26     β”‚ "Iron"     β”‚ 55.845       β”‚ "Fe"   β”‚ missing    β”‚

and, ironically, dropmissing is missing.

just my installation (reinstall everything?) or wider problem?


#2

I had the same issue. After I run using Missings twice, then it seems OK.


#3

not for me…


#4

Did you Pkg.update() recently? Are you on the master branch or on the latest tagged release (Pkg.status("Missings") will tell)? A new release was tagged 3 days, it does have a commit related to this. I was not able to reproduce your problem and I am on the latest release.


#5

I confirmed this on another computer with a new install of JuliaPro. (I had JuliaPlain on it, though.) MacOS. I would presume I am on the Master branch. I am not developing anything.

> julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.2 (2017-12-13 18:08 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-apple-darwin14.5.0
`  ## inserted for coloring in discourse

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Cloning cache of CodeTools from https://github.com/JunoLab/CodeTools.jl.git
...
INFO: Cloning cache of Hiccup from https://github.com/JunoLab/Hiccup.jl.git
INFO: Computing changes...
INFO: No packages to install, update or remove

julia> using Missings
ERROR: ArgumentError: Module Missings not found in current path.
Run `Pkg.add("Missings")` to install the Missings package.
Stacktrace:
 [1] _require(::Symbol) at ./loading.jl:435
 [2] require(::Symbol) at ./loading.jl:405

julia> Pkg.add("Missings")
INFO: Cloning cache of Missings from https://github.com/JuliaData/Missings.jl.git
INFO: Installing Missings v0.2.6
INFO: Package database updated

julia> using Missings
INFO: Precompiling module Missings.
ERROR: LoadError: UndefVarError: IteratorSize not defined
Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:576
 [2] include(::String) at ./sysimg.jl:14
 [3] anonymous at ./<missing>:2
while loading /Applications/JuliaPro-0.6.2.1.app/Contents/Resources/pkgs-0.6.2.1/v0.6/Missings/src/Missings.jl, in expression starting on line 281
ERROR: Failed to precompile Missings to /Applications/JuliaPro-0.6.2.1.app/Contents/Resources/pkgs-0.6.2.1/lib/v0.6/Missings.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:710
 [2] _require(::Symbol) at ./loading.jl:463
 [3] require(::Symbol) at ./loading.jl:405

#6

#7

Yea, looks like you are on v0.2.6 and the latest release is v0.2.7 (which should fix your problem).


#8

in theory. in practice, under Julia Pro, it does not want to install 0.2.7…

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating cache of AbstractFFTs...
INFO: Updating cache of SimpleTraits...
INFO: Computing changes...
INFO: No packages to install, update or remove

julia> Pkg.install("Missings")
ERROR: UndefVarError: install not defined

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating cache of AbstractFFTs...
INFO: Updating cache of SimpleTraits...
INFO: Computing changes...
INFO: No packages to install, update or remove

julia> Pkg.add("Missings")
INFO: Package Missings is already installed

julia> Pkg.status("Missings")
 - Missings                      0.2.6

interestingly, JuliaPlain 0.2.6 picks up the new version, but has different problems now:

julia> Pkg.add("Missings"); Pkg.status("Missings")
INFO: No packages to install, update or remove
INFO: Package database updated
 - Missings                      0.2.7

unfortunately, now

julia> using DataFrames, Missings

julia> ptable = DataFrame(  Number       =   [1,   2,    6,    8,    26    ],
      Name         =   ["Hydrogen",   "Helium",   "Carbon",   "Oxygen",   "Iron"   ],
      AtomicWeight =   [1.0079,    4.0026,  12.0107, 15.9994, 55.845   ],
      Symbol       =   ["H",    "He",    "C",    "O",  "Fe"  ],
      Discovered   =   [1776,   1895,    0,    1774,    missing    ]);

julia> ptable[complete_cases(ptable),:]
5Γ—5 DataFrames.DataFrame
β”‚ Row β”‚ Number β”‚ Name       β”‚ AtomicWeight β”‚ Symbol β”‚ Discovered β”‚
β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1   β”‚ 1      β”‚ "Hydrogen" β”‚ 1.0079       β”‚ "H"    β”‚ 1776       β”‚
β”‚ 2   β”‚ 2      β”‚ "Helium"   β”‚ 4.0026       β”‚ "He"   β”‚ 1895       β”‚
β”‚ 3   β”‚ 6      β”‚ "Carbon"   β”‚ 12.0107      β”‚ "C"    β”‚ 0          β”‚
β”‚ 4   β”‚ 8      β”‚ "Oxygen"   β”‚ 15.9994      β”‚ "O"    β”‚ 1774       β”‚
β”‚ 5   β”‚ 26     β”‚ "Iron"     β”‚ 55.845       β”‚ "Fe"   β”‚ missing    β”‚

which, I think, should have removed row 5.

regards,

/iaw


#9

I can’t replicate this bug, for me it does remove row 5.

julia> Pkg.status("DataFrames")
 - DataFrames                    0.11.5

julia> Pkg.status("Missings")
 - Missings                      0.2.7

#10

this seems to be another Pkg issue, here with JuliaPlain 0.6.2:

julia> Pkg.status("Missings")
 - Missings                      0.2.7

julia> Pkg.status("DataFrames")
 - DataFrames                    0.10.1

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove

afaik, all I am supposed to do as an end user is Pkg.add and Pkg.update. the package manager is in charge of selecting the correct version of the packages. I don’t even know how I would force DataFrames into a newer version.

is there a way for me to force these? is this all bugs in Pkg?


#11

Read through this topic for suggestions, but note that some of them may be outdated. Strictly speaking, it is probably not a bug, but some packages holding it back. You have to find and remove those.

In case you are using JuliaPro, that may not be possible because AFAIK it pins some packages.