# Error precompiling DataFrames: UndefVarError: ComposedFunction not defined

**URL:** <https://discourse.julialang.org/t/error-precompiling-dataframes-undefvarerror-composedfunction-not-defined/63555>\
**Category:** General Usage\
**Tags:** dataframes\
**Created:** [June 25, 2021, 2:13pm UTC](https://discourse.julialang.org/t/error-precompiling-dataframes-undefvarerror-composedfunction-not-defined/63555 "2021-06-25T14:13:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike\_k](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike_k/32/211864_2.png) [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Post date:** [June 25, 2021, 2:13pm UTC](https://discourse.julialang.org/t/error-precompiling-dataframes-undefvarerror-composedfunction-not-defined/63555/1 "2021-06-25T14:13:37Z")

</div>

Dear folks,

I work in a project using a specific `Project.toml` in which I have not updated the packages for a while because everything was working fine. When I start that project now and instantiate it with `Pkg`, there is an error when `DataFrames` is precompiled. I use `Atom` and `Julia 1.4.0` on `Ubuntu 18.04`. The problem exists also after a fresh reboot and a new REPL session. However, it seems to work in a REPL session started from the shell (not in Atom). The stacktrace is

```julia
[Info: Precompiling DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]
ERROR: LoadError: LoadError: UndefVarError: ComposedFunction not defined
Stacktrace:
 [1] top-level scope at /home/mk/.julia/packages/DataFrames/nxjiD/src/other/utils.jl:82
 [2] include(::Module, ::String) at ./Base.jl:377
 [3] include(::String) at /home/mk/.julia/packages/DataFrames/nxjiD/src/DataFrames.jl:1
 [4] top-level scope at /home/mk/.julia/packages/DataFrames/nxjiD/src/DataFrames.jl:109
 [5] include(::Module, ::String) at ./Base.jl:377
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:331 [inlined]
 [8] eval(::Expr) at ./client.jl:449
 [9] top-level scope at ./none:3
in expression starting at /home/mk/.julia/packages/DataFrames/nxjiD/src/other/utils.jl:79
in expression starting at /home/mk/.julia/packages/DataFrames/nxjiD/src/DataFrames.jl:109
ERROR: Failed to precompile DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0] to /home/mk/.julia/compiled/v1.4/DataFrames/AR9oZ_yCSnu.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922

```

The installed DataFrames version is ` [a93c6f00] DataFrames v1.1.1` but the same problem appears with older versions.

Do you have any ideas how to fix that? Thank you in advance.

Best regards, mk

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [June 25, 2021, 2:18pm UTC](https://discourse.julialang.org/t/error-precompiling-dataframes-undefvarerror-composedfunction-not-defined/63555/2 "2021-06-25T14:18:07Z")

</div>

`ComposedFunction` was introduced in Julia 1.6, which is why you are getting an error about `ComposedFunction` not being defined.

However there is still a problem, as DataFrames.jl should be smart enough to detect your lower Julia version and behave appropriately, see [here](https://github.com/JuliaData/DataFrames.jl/blob/0b4f45880f26f37462f7b1d2cc85c9a1d3268069/src/other/utils.jl#L79).

The fact that it works in the shell but not Atom is interesting. I think somehow your Compat package is being held back by Atom.

---

<div class="post-metadata">

**Author:** ![mike\_k](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike_k/32/211864_2.png) [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Post date:** [June 25, 2021, 2:39pm UTC](https://discourse.julialang.org/t/error-precompiling-dataframes-undefvarerror-composedfunction-not-defined/63555/3 "2021-06-25T14:39:03Z")

</div>

Thank you for the answer. I forgot to say that I upgraded to `DataFrames v1.1.1` after the problem appeared the first time. Before it was `DataFrames v0.22.1` and `Compat v3.23.0`. I now reverted to that version which worked fine for several month. The problem appeared more or less from one day to the next. But I did not do any update to the project setting (and Atom also does not update automatically).

I gave it another try with the “original setting”, and can confirm it works in the shell but not in Atom ☹
