# Is there a bug in package DataFramesMeta?

**URL:** <https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395>\
**Category:** General Usage\
**Tags:** question\
**Created:** [February 14, 2022, 7:45am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395 "2022-02-14T07:45:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [February 14, 2022, 7:45am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395/1 "2022-02-14T07:45:52Z")

</div>

Package `DataFramesMeta` looks very useful. I gave it a try and some things did not work. The following example, copied from [[Introduction · DataFramesMeta Documentation](https://juliadata.github.io/DataFramesMeta.jl/stable/)], was tried in a new Julia session in an environment where the packages `DataFrames` and `DataFramesMeta` had been previously added.

```julia
using DataFrames
using DataFramesMeta
df = DataFrame(x = [1, 1, 2, 2], y = [1, 2, 101, 102])
@select(df, :x, :y) # Works fine
4×2 DataFrame
 Row │ x y     
     │ Int64 Int64
─────┼──────────────
   1 │ 1 1
   2 │ 1 2
   3 │ 2 101
   4 │ 2 102
@select(df, :x2 = 2 * :x, :y)
ERROR: LoadError: ArgumentError: This path should not be reached
Stacktrace:
 [1] fun_to_vec(ex::Expr; nolhs::Bool, gensym_names::Bool, wrap_byrow::Bool)
   @ DataFramesMeta C:\Users\fsald\.julia\packages\DataFramesMeta\z0mc6\src\parsing.jl:302
 [2] (::DataFramesMeta.var"#30#31"{Bool})(ex::Expr)
   @ DataFramesMeta .\none:0
 [3] iterate(::Base.Generator{Vector{Any}, DataFramesMeta.var"#30#31"{Bool}}) 
   @ Base .\generator.jl:47
 [4] select_helper(::Symbol, ::Expr, ::Vararg{Any})
   @ DataFramesMeta C:\Users\fsald\.julia\packages\DataFramesMeta\z0mc6\src\macros.jl:976
 [5] var"@select"( __source__ ::LineNumberNode, __module__ ::Module, x::Any, args::Vararg{Any})
   @ DataFramesMeta C:\Users\fsald\.julia\packages\DataFramesMeta\z0mc6\src\macros.jl:1078
in expression starting at REPL[10]:1

```

Is this a bug?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [February 14, 2022, 7:51am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395/2 "2022-02-14T07:51:38Z")

</div>

Works fine for me:

```julia
julia> @select(df, :x2 = 2 * :x, :y)
4×2 DataFrame
 Row │ x2 y     
     │ Int64 Int64 
─────┼──────────────
   1 │ 2 1
   2 │ 2 2
   3 │ 4 101
   4 │ 4 102

(jl_eYtAAA) pkg> st
      Status `/tmp/jl_eYtAAA/Project.toml`
  [1313f7d8] DataFramesMeta v0.10.0

```

Are you sure you’re on the latest version of `DataFramesMeta`? Also you don’t need to `using DataFrames` because `DataFramesMeta` reexports `DataFrames`.

---

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [February 14, 2022, 7:59am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395/3 "2022-02-14T07:59:58Z")

</div>

I just installed `DataFramesMeta`. After reading your post I looked and found the following in `Project.toml`:

```julia
DataFramesMeta = "1313f7d8-7da2-5740-9ea0-a2ca25f37964"

```

Then I did an `] update` for the packages in the project. Checked again and the line in `Project.toml` had not changed. I tried to run the code and got the same error message.

This is in `Manifest.toml`:

```julia
[[deps.DataFramesMeta]]
deps = ["DataFrames", "MacroTools", "Reexport"]
git-tree-sha1 = "b0c9d19eb76bbd5b185bad3a80c447cf8e9404f0"
uuid = "1313f7d8-7da2-5740-9ea0-a2ca25f37964"
version = "0.7.1"

```

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [February 14, 2022, 8:03am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395/4 "2022-02-14T08:03:24Z")

</div>

Yes - so as you can see you have DataFramesMeta.jl 0.7.1 installed and the current version is 0.10.0. Please do `]add DataFramesMeta@0.10` to see what is holding back the update of the package to its latest version.

---

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [February 14, 2022, 8:10am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395/5 "2022-02-14T08:10:10Z")

</div>

I though `] update` would take care of this.

I tried what you suggested with versions 0.10.1, 0.10.0 and 00.11.7 and did not work. Here is what I got:

```julia
(BW1) pkg> add DataFramesMeta@0.10.1
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package DataFramesMeta [1313f7d8]:
 DataFramesMeta [1313f7d8] log:
 ├─possible versions are: 0.4.0-0.10.0 or uninstalled
 └─restricted to versions 0.10.1 by an explicit requirement — no versions left

(BW1) pkg> add DataFramesMeta@0.10.0
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package DataFrames [a93c6f00]:
 DataFrames [a93c6f00] log:
 ├─possible versions are: 0.11.7-1.3.2 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.11.7-1.3.2
 ├─restricted by compatibility requirements with DataFramesMeta [1313f7d8] to versions: 1.0.0-1.3.2
 │ └─DataFramesMeta [1313f7d8] log:
 │ ├─possible versions are: 0.4.0-0.10.0 or uninstalled
 │ └─restricted to versions 0.10.0 by an explicit requirement, leaving only versions 0.10.0
 └─restricted by compatibility requirements with Lathe [38d8eb38] to versions:
 0.11.7-0.22.7 — no versions left
   └─Lathe [38d8eb38] log:
     ├─possible versions are: 0.0.3-0.1.8 or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions 0.0.3-0.1.8

(BW1) pkg> add DataFramesMeta@0.11.7
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package DataFramesMeta [1313f7d8]:
 DataFramesMeta [1313f7d8] log:
 ├─possible versions are: 0.4.0-0.10.0 or uninstalled
 └─restricted to versions 0.11.7 by an explicit requirement — no versions left

```

---

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [February 14, 2022, 8:18am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395/6 "2022-02-14T08:18:06Z")

</div>

I also removed `DataFramesMeta` and reinstalled it with:

```julia
] rm DataFramesMeta
add DataFramesMeta

```

Version 0.7.1 was installed again. I also tried this and `DataFramesMeta` was not installed.

```julia
] rm DataFramesMeta
add DataFramesMeta@0.10.1

```

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [February 14, 2022, 8:25am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395/7 "2022-02-14T08:25:50Z")

</div>

It tells you exactly what’s going wrong - you are using `Lathe`, a package which hasn’t been updated in a long time and is restricted to using a very old DataFrames version (0.22). Given that DataFramesMeta is developed based on the stable, post 1.0 API of DataFrames, all recent DataFramesMeta versions require DataFrames post 1.0.

---

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [February 14, 2022, 8:43am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395/8 "2022-02-14T08:43:09Z")

</div>

Thanks. I removed package `Lathe` and that solved the problem. Now the `DataFramesMeta` code of the original post works.

After a `] update` I also saw that the version of the `DataFrames` package changed to `1.3.2`.

The only _caveat_ is that I was only able to install `version 0.10.0` of `DataFramesMeta`. When I tried to install `version 0.10.1` I got a short message that does not specify the reason for not installing:

```julia
(BW1) pkg> add DataFramesMeta@0.10.1
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package DataFramesMeta [1313f7d8]:
 DataFramesMeta [1313f7d8] log:
 ├─possible versions are: 0.4.0-0.10.0 or uninstalled
 └─restricted to versions 0.10.1 by an explicit requirement — no versions left

```

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [February 14, 2022, 8:46am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-dataframesmeta/76395/9 "2022-02-14T08:46:31Z")

</div>

That’s because it doesn’t exist - 0.10.0 is the current release

[https://github.com/JuliaData/DataFramesMeta.jl/releases](https://github.com/JuliaData/DataFramesMeta.jl/releases)

Which is what the error message tells you (`possible versions are 0.4.0-0.10.0`)
