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

Recent breakage of Latexify on sparse matrices? #269

Closed
ChrisRackauckas opened this issue Jun 30, 2023 · 1 comment · Fixed by #302
Closed

Recent breakage of Latexify on sparse matrices? #269

ChrisRackauckas opened this issue Jun 30, 2023 · 1 comment · Fixed by #302

Comments

@ChrisRackauckas
Copy link
Contributor

JuliaSymbolics/Symbolics.jl#923 (comment)

https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923

ERROR: LoadError: MethodError: no method matching zero(::String)

Closest candidates are:
  zero(!Matched::Union{Type{P}, P}) where P<:Dates.Period
   @ Dates /opt/hostedtoolcache/julia/1.9.1/x64/share/julia/stdlib/v1.9/Dates/src/periods.jl:51
  zero(!Matched::Union{AbstractAlgebra.Generic.LaurentSeriesFieldElem{T}, AbstractAlgebra.Generic.LaurentSeriesRingElem{T}} where T<:AbstractAlgebra.RingElement)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/YkCOC/src/generic/LaurentSeries.jl:443
  zero(!Matched::Union{AbstractAlgebra.Generic.LaurentSeriesFieldElem{T}, AbstractAlgebra.Generic.LaurentSeriesRingElem{T}} where T<:AbstractAlgebra.RingElement, !Matched::Union{Char, AbstractString, Symbol}; cached)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/YkCOC/src/generic/LaurentSeries.jl:443
  ...

Stacktrace:
  [1] iszero(x::String)
    @ Base ./number.jl:42
  [2] _iszero(x::String)
    @ SparseArrays /opt/hostedtoolcache/julia/1.9.1/x64/share/julia/stdlib/v1.9/SparseArrays/src/SparseArrays.jl:37
  [3] _noshapecheck_map(::Base.Broadcast.var"#43#44"{Base.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:env,), Tuple{Symbol}}}, typeof(Latexify.latexraw)}, ::SparseArrays.SparseMatrixCSC{Num, Int64})
    @ SparseArrays.HigherOrderFns /opt/hostedtoolcache/julia/1.9.1/x64/share/julia/stdlib/v1.9/SparseArrays/src/higherorderfns.jl:181
  [4] copy
    @ /opt/hostedtoolcache/julia/1.9.1/x64/share/julia/stdlib/v1.9/SparseArrays/src/higherorderfns.jl:195 [inlined]
  [5] materialize
    @ ./broadcast.jl:873 [inlined]
  [6] _latexarray(arr::SparseArrays.SparseMatrixCSC{Num, Int64}; adjustment::Symbol, transpose::Bool, double_linebreak::Bool, starred::Bool, arraystyle::Symbol, kwargs::Base.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:env,), Tuple{Symbol}}})
    @ Latexify ~/.julia/packages/Latexify/2ODIr/src/latexarray.jl:47
  [7] _latexarray
    @ ~/.julia/packages/Latexify/2ODIr/src/latexarray.jl:17 [inlined]
  [8] #_latexraw#46
    @ ~/.julia/packages/Latexify/2ODIr/src/latexraw.jl:112 [inlined]
  [9] process_latexify(args::SparseArrays.SparseMatrixCSC{Num, Int64}; kwargs::Base.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:env,), Tuple{Symbol}}})
    @ Latexify ~/.julia/packages/Latexify/2ODIr/src/latexify_function.jl:49
 [10] process_latexify
    @ ~/.julia/packages/Latexify/2ODIr/src/latexify_function.jl:40 [inlined]
 [11] #latexraw#40
    @ ~/.julia/packages/Latexify/2ODIr/src/latexraw.jl:58 [inlined]
 [12] latexraw
    @ ~/.julia/packages/Latexify/2ODIr/src/latexraw.jl:58 [inlined]
 [13] _latexequation(eq::SparseArrays.SparseMatrixCSC{Num, Int64}; starred::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Latexify ~/.julia/packages/Latexify/2ODIr/src/latexequation.jl:5
 [14] _latexequation(eq::SparseArrays.SparseMatrixCSC{Num, Int64})
    @ Latexify ~/.julia/packages/Latexify/2ODIr/src/latexequation.jl:4
 [[15](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:16)] process_latexify(args::SparseArrays.SparseMatrixCSC{Num, Int64}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Latexify ~/.julia/packages/Latexify/2ODIr/src/latexify_function.jl:49
 [[16](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:17)] process_latexify
    @ ~/.julia/packages/Latexify/2ODIr/src/latexify_function.jl:40 [inlined]
 [[17](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:18)] latexify(args::SparseArrays.SparseMatrixCSC{Num, Int64}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Latexify ~/.julia/packages/Latexify/2ODIr/src/latexify_function.jl:27
 [[18](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:19)] latexify
    @ ~/.julia/packages/Latexify/2ODIr/src/latexify_function.jl:25 [inlined]
 [[19](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:20)] show(io::IOContext{IOBuffer}, #unused#::MIME{Symbol("text/latex")}, x::SparseArrays.SparseMatrixCSC{Num, Int64})
    @ Symbolics ~/work/Symbolics.jl/Symbolics.jl/src/latexify_recipes.jl:124
 [[20](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:21)] __binrepr(m::MIME{Symbol("text/latex")}, x::SparseArrays.SparseMatrixCSC{Num, Int64}, context::Pair{Symbol, Bool})
    @ Base.Multimedia ./multimedia.jl:173
 [[21](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:22)] _textrepr
    @ ./multimedia.jl:163 [inlined]
 [[22](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:23)] #stringmime#8
    @ /opt/hostedtoolcache/julia/1.9.1/x64/share/julia/stdlib/v1.9/Base64/src/Base64.jl:44 [inlined]
 [[23](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:24)] display_dict(x::SparseArrays.SparseMatrixCSC{Num, Int64}; context::Pair{Symbol, Bool})
    @ Documenter.Utilities ~/.julia/packages/Documenter/H5y27/src/Utilities/Utilities.jl:691
 [[24](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:25)] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Pair{Symbol, Bool}, Tuple{Symbol}, NamedTuple{(:context,), Tuple{Pair{Symbol, Bool}}}})
    @ Base ./essentials.jl:818
 [[25](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:26)] runner(#unused#::Type{Documenter.Expanders.ExampleBlocks}, x::Markdown.Code, page::Documenter.Documents.Page, doc::Documenter.Documents.Document)
    @ Documenter.Expanders ~/.julia/packages/Documenter/H5y27/src/Expanders.jl:656
 [[26](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:27)] dispatch(::Type{Documenter.Expanders.ExpanderPipeline}, ::Markdown.Code, ::Vararg{Any})
    @ Documenter.Utilities.Selectors ~/.julia/packages/Documenter/H5y[27](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:28)/src/Utilities/Selectors.jl:170
 [27] expand(doc::Documenter.Documents.Document)
    @ Documenter.Expanders ~/.julia/packages/Documenter/H5y27/src/Expanders.jl:42
 [[28](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:29)] runner(#unused#::Type{Documenter.Builder.ExpandTemplates}, doc::Documenter.Documents.Document)
    @ Documenter.Builder ~/.julia/packages/Documenter/H5y27/src/Builder.jl:226
 [[29](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:30)] dispatch(#unused#::Type{Documenter.Builder.DocumentPipeline}, x::Documenter.Documents.Document)
    @ Documenter.Utilities.Selectors ~/.julia/packages/Documenter/H5y27/src/Utilities/Selectors.jl:170
 [[30](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:31)] #2
    @ ~/.julia/packages/Documenter/H5y27/src/Documenter.jl:273 [inlined]
 [[31](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:32)] cd(f::Documenter.var"#2#3"{Documenter.Documents.Document}, dir::String)
    @ Base.Filesystem ./file.jl:112
 [[32](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:33)] makedocs(; debug::Bool, format::Documenter.Writers.HTMLWriter.HTML, kwargs::Base.Pairs{Symbol, Any, NTuple{8, Symbol}, NamedTuple{(:sitename, :authors, :modules, :clean, :doctest, :strict, :mathengine, :pages), Tuple{String, String, Vector{Module}, Bool, Bool, Vector{Symbol}, MathJax3, Vector{Any}}}})
    @ Documenter ~/.julia/packages/Documenter/H5y27/src/Documenter.jl:272
 [[33](https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/5409041415/jobs/9828721146?pr=923#step:5:34)] top-level scope
    @ ~/work/Symbolics.jl/Symbolics.jl/docs/make.jl:17
in expression starting at /home/runner/work/Symbolics.jl/Symbolics.jl/docs/make.jl:17
@gustaphe
Copy link
Collaborator

gustaphe commented Aug 7, 2024

Sorry to get back to this a year later. I'm in the last stretch of my PhD, so I needed some distraction. #302 solves this.

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