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 with PrettyTables for DenseAxisArray #26

Closed
hellemo opened this issue Sep 28, 2022 · 3 comments
Closed

Error with PrettyTables for DenseAxisArray #26

hellemo opened this issue Sep 28, 2022 · 3 comments

Comments

@hellemo
Copy link
Member

hellemo commented Sep 28, 2022

julia> # Read solution values for u
       pretty_table(table(u, :u, :car, :year))
ERROR: type Int64 has no field I
Stacktrace:
  [1] getproperty
    @ ./Base.jl:37 [inlined]
  [2] iterate(iter::CartesianIndices{2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, state::Int64)
    @ Base.IteratorsMD ./multidimensional.jl:402
  [3] iterate(t::SparseVariables.SolutionTableDense, state::Int64)
    @ SparseVariables ~/code/SparseVariables.jl/src/tables.jl:92
  [4] iterate
    @ ~/.julia/packages/Tables/fouQB/src/tofromdatavalues.jl:53 [inlined]
  [5] _preprocess_Tables_row(data::SparseVariables.SolutionTableDense, header::Nothing)
    @ PrettyTables ~/.julia/packages/PrettyTables/h6QBK/src/private.jl:107
  [6] #_pretty_table#68
    @ ~/.julia/packages/PrettyTables/h6QBK/src/private.jl:261 [inlined]
  [7] _pretty_table
    @ ~/.julia/packages/PrettyTables/h6QBK/src/private.jl:250 [inlined]
  [8] #pretty_table#60
    @ ~/.julia/packages/PrettyTables/h6QBK/src/print.jl:702 [inlined]
  [9] pretty_table(data::SparseVariables.SolutionTableDense)
    @ PrettyTables ~/.julia/packages/PrettyTables/h6QBK/src/print.jl:700
 [10] top-level scope
    @ REPL[54]:2
@trulsf
Copy link
Member

trulsf commented Sep 29, 2022

This is due to a slight strange use of the iterate() function in PrettyTables with an easy fix. I will submit an issue (or a PR).

@trulsf
Copy link
Member

trulsf commented Sep 29, 2022

Submitted as a PR: ronisbr/PrettyTables.jl#182

@hellemo
Copy link
Member Author

hellemo commented Sep 29, 2022

Works on current PrettyTables.jl master.

@hellemo hellemo closed this as completed Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants