CSV.jl fails precompling, TypeError: in Type{...} expression, expected UnionAll, got Type{Parsers.Options}

This has come up a couple of times recently and is due to a new breaking release in the Parsers.jl v2.0 release, which in and of itself shouldn’t cause problems, since CSV.jl 0.8.5 has dependencies correctly capped, but still becomes an issue because there are unfortunate ways for package dependencies to get loaded without having the right versions. See this slack thread for more details. Basically, it boils down to some 3rd-party package (in this case, probably IJulia.jl) loading a package like JSON.jl, which also depends on Parsers.jl, and does have a current release compatible with Parsers.jl 2.0, so 2.0 gets loaded, but then the current environment gets switched, and CSV.jl is loaded and the right versions can’t be resolved quite right and it’s assumed that the already loaded Parsers module is the “right one”.

This can usually be fixed by pinning Parsers.jl to v1.2.1 for the time being. A new CSV.jl release compatible with Parsers.jl 2.0 is coming soon, hopefully in the next week or so.

14 Likes