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

showtable gives InexactError: trunc(Int128, 1.0e100) #70

Closed
henriquebecker91 opened this issue Mar 26, 2021 · 2 comments · Fixed by #71
Closed

showtable gives InexactError: trunc(Int128, 1.0e100) #70

henriquebecker91 opened this issue Mar 26, 2021 · 2 comments · Fixed by #71

Comments

@henriquebecker91
Copy link

I have a DataFrame read from a CSV that is apparently completely valid (i.e., the CSV is read and transformed to a DataFrame without any error, and I can see its columns by other means). But calling showtable on it triggers an InexactError: trunc(Int128, 1.0e100) exception.

The stacktrace follows:

InexactError: trunc(Int128, 1.0e100)

Stacktrace:
 [1] trunc at ./float.jl:703 [inlined]
 [2] (::TableView.var"#10#11"{JSON.Serializations.StandardSerialization,JSON.Writer.CompactContext{Base.GenericIOBuffer{Array{UInt8,1}}}})(::Float64, ::Int64, ::Symbol) at /home/henrique/.julia/packages/TableView/KmU8j/src/TableView.jl:276
 [3] eachcolumn at /home/henrique/.julia/packages/Tables/UxLRG/src/utils.jl:70 [inlined]
 [4] table2json(::Tables.Schema{(:formulation, :instance_name, :rotation, :filename, :filepath, :solver, :relax, :solver_time_limit, :solver_threads, :termination_status, :raw_status, :primal_status, :dual_status, :simplex_iterations, :barrier_iterations, :number_of_variables, :number_of_constraints, :objective_bound, :objective_value, :dual_objective_value, :solve_time, :node_count, :relative_gap, :exception_detected),Tuple{String,String,Int64,String,String,String,Int64,Float64,Float64,String,String,String,String,Float64,Float64,Int64,Int64,Float64,Float64,Float64,Float64,Float64,Float64,Bool}}, ::DataFrames.DataFrameRows{DataFrame}, ::NTuple{24,DataType}; requested::Nothing) at /home/henrique/.julia/packages/TableView/KmU8j/src/TableView.jl:275
 [5] table2json at /home/henrique/.julia/packages/TableView/KmU8j/src/TableView.jl:264 [inlined]
 [6] _showtable_sync!(::Scope, ::Tables.Schema{(:formulation, :instance_name, :rotation, :filename, :filepath, :solver, :relax, :solver_time_limit, :solver_threads, :termination_status, :raw_status, :primal_status, :dual_status, :simplex_iterations, :barrier_iterations, :number_of_variables, :number_of_constraints, :objective_bound, :objective_value, :dual_objective_value, :solve_time, :node_count, :relative_gap, :exception_detected),Tuple{String,String,Int64,String,String,String,Int64,Float64,Float64,String,String,String,String,Float64,Float64,Int64,Int64,Float64,Float64,Float64,Float64,Float64,Float64,Bool}}, ::NTuple{24,Symbol}, ::NTuple{24,DataType}, ::DataFrames.DataFrameRows{DataFrame}, ::Array{Dict{Symbol,Any},1}, ::Int64, ::String, ::Dict{Symbol,Any}) at /home/henrique/.julia/packages/TableView/KmU8j/src/TableView.jl:202
 [7] showtable(::DataFrame, ::Dict{Symbol,Any}; dark::Bool, title::String, height::Symbol, width::String, cell_changed::Nothing) at /home/henrique/.julia/packages/TableView/KmU8j/src/TableView.jl:196
 [8] showtable at /home/henrique/.julia/packages/TableView/KmU8j/src/TableView.jl:71 [inlined] (repeats 2 times)
 [9] top-level scope at In[9]:6
 [10] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091

The problem seem to arise because a column has some very large values? I would guess this bug was introduced by this recent commit: baumgold@5dd10f6 but I am not sure if it is the exact line that appears in the stacktrace.

@baumgold
Copy link
Contributor

My apologies for the bug. #71 for the fix.

@henriquebecker91
Copy link
Author

Thanks for the fast answer.

baumgold pushed a commit to baumgold/TableView.jl that referenced this issue Mar 28, 2021
baumgold pushed a commit to baumgold/TableView.jl that referenced this issue Mar 28, 2021
baumgold pushed a commit to baumgold/TableView.jl that referenced this issue Mar 28, 2021
pfitzseb added a commit that referenced this issue Mar 28, 2021
#70 fix bug preventing large floats from being displayed
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

Successfully merging a pull request may close this issue.

2 participants