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

Error while loading dataset #26

Open
nicolamos opened this issue Apr 8, 2024 · 4 comments
Open

Error while loading dataset #26

nicolamos opened this issue Apr 8, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@nicolamos
Copy link

On version 0.9.0 I get the following error on a fresh installation and new data collection, while reading a CSV dataset.

mydataset is a CSV file.

julia> d"mydataset"

Result:

1-element ExceptionStack:
UndefVarError: `tf` not defined
Stacktrace:
  [1] (::DataToolkitBase.var"#108#117"{UnionAll})(f::Type)
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/SHYq3/src/interaction/externals.jl:249
  [2] iterate
    @ ./generator.jl:47 [inlined]
  [3] _collect(c::Vector{DataType}, itr::Base.Generator{Vector{DataType}, DataToolkitBase.var"#108#117"{UnionAll}}, ::Base.EltypeUnknown, isz::Base.HasShape{1})
    @ Base ./array.jl:854
  [4] collect_similar(cont::Vector{DataType}, itr::Base.Generator{Vector{DataType}, DataToolkitBase.var"#108#117"{UnionAll}})
    @ Base ./array.jl:763
  [5] map(f::Function, A::Vector{DataType})
    @ Base ./abstractarray.jl:3285
  [6] _read(dataset::DataToolkitBase.DataSet, as::Type)
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/SHYq3/src/interaction/externals.jl:240
  [7] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Base ./essentials.jl:892
  [8] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base ./essentials.jl:889
  [9] invokepkglatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/SHYq3/src/model/usepkg.jl:101
 [10] invokepkglatest(::Any, ::Any, ::Vararg{Any})
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/SHYq3/src/model/usepkg.jl:100
 [11] (::DataToolkitBase.AdviceAmalgamation)(::Function, ::Any, ::Vararg{Any}; kwargs...)
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/SHYq3/src/model/advice.jl:102
 [12] (::DataToolkitBase.AdviceAmalgamation)(::Function, ::Any, ::Vararg{Any})
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/SHYq3/src/model/advice.jl:98
 [13] macro expansion
    @ ~/.julia/packages/DataToolkitBase/SHYq3/src/model/advice.jl:131 [inlined]
 [14] _dataadvisecall(::typeof(DataToolkitBase._read), ::DataToolkitBase.DataSet, ::Type{Matrix}; kwargs::@Kwargs{})
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/SHYq3/src/model/advice.jl:131
 [15] read(dataset::DataToolkitBase.DataSet)
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/SHYq3/src/interaction/externals.jl:160
 [16] macro expansion
    @ ~/.julia/packages/DataToolkit/VObGv/src/DataToolkit.jl:48 [inlined]
@tecosaur tecosaur transferred this issue from tecosaur/DataToolkit.jl Apr 8, 2024
@tecosaur
Copy link
Owner

tecosaur commented Apr 8, 2024

Well that's not what we want! Seems like this is just a case of a typo sneaking in, if you try ]add DataToolkitBase#main, I've just pushed a fix. Do let me know if that fixes it for you 🙂.

@nicolamos
Copy link
Author

For that part now is ok, but still get some error.

I defined the dataset as follows (named machines).

data_config_version = 0
uuid = "511c205b-ffc2-4505-9059-9bdea508edc8"
name = "machines"
plugins = ["store", "defaults", "memorise"]

[[machines]]
uuid = "9ebdc0ee-f448-4158-92fc-b5faa0205687"
description = "machine db"

    [[machines.storage]]
    driver = "filesystem"
    path = "~/cdc-files/db_machines.csv"
    type = "DataToolkitBase.FilePath"

    [[machines.loader]]
    driver = "csv"

But when I try to read it, I get the following error.

ERROR: UnsatisfyableTransformer: There are no storages for "machines" that can provide a IO.
 The defined storages are as follows:
   DataStorage{filesystem}(DataToolkitBase.FilePath)
Stacktrace:
  [1] _read(dataset::DataToolkitBase.DataSet, as::Type)
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/OlrOW/src/interaction/externals.jl:253
  [2] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Base ./essentials.jl:892
  [3] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base ./essentials.jl:889
  [4] invokepkglatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/OlrOW/src/model/usepkg.jl:101
  [5] invokepkglatest(::Any, ::Any, ::Vararg{Any})
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/OlrOW/src/model/usepkg.jl:100
  [6] (::DataToolkitBase.AdviceAmalgamation)(::Function, ::Any, ::Vararg{Any}; kwargs...)
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/OlrOW/src/model/advice.jl:102
  [7] (::DataToolkitBase.AdviceAmalgamation)(::Function, ::Any, ::Vararg{Any})
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/OlrOW/src/model/advice.jl:98
  [8] macro expansion
    @ ~/.julia/packages/DataToolkitBase/OlrOW/src/model/advice.jl:131 [inlined]
  [9] _dataadvisecall(::typeof(DataToolkitBase._read), ::DataToolkitBase.DataSet, ::Type{DataFrame}; kwargs::@Kwargs{})
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/OlrOW/src/model/advice.jl:131
 [10] read(dataset::DataToolkitBase.DataSet)
    @ DataToolkitBase ~/.julia/packages/DataToolkitBase/OlrOW/src/interaction/externals.jl:160
 [11] macro expansion
    @ ~/.julia/packages/DataToolkit/VObGv/src/DataToolkit.jl:48 [inlined]

@tecosaur
Copy link
Owner

tecosaur commented Apr 9, 2024

Hmmm, that's a funky one. Say, do you have an account on the Julia Zulip/Slack where we could chat more? I might be able to better help figure these out over IMs.

@tecosaur tecosaur added the bug Something isn't working label May 16, 2024
@tecosaur
Copy link
Owner

So, the issue in the latest comment here was that

type = "DataToolkitBase.FilePath"

meant that it could only provide a FilePath, no IO, but I'm not sure why this line appeared.

At any rate, I'm soon to make a bunch of changes around this, hopefully they'll help.

@tecosaur tecosaur transferred this issue from tecosaur/DataToolkitCore.jl May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants