EconForge / Dolo.jl

Economic modeling in Julia
Other
57 stars 29 forks source link

Model printing broken on 1.0 in jupyter #147

Closed albop closed 5 years ago

albop commented 5 years ago
MethodError: no method matching replace(::String, ::String, ::String)
Closest candidates are:
  replace(::String, !Matched::Pair{#s55,B} where B where #s55<:AbstractChar; count) at strings/util.jl:414
  replace(::String, !Matched::Pair{#s52,B} where B where #s52<:Union{Tuple{Vararg{AbstractChar,N} where N}, Set{#s49} where #s49<:AbstractChar, AbstractArray{#s50,1} where #s50<:AbstractChar}; count) at strings/util.jl:419
  replace(::String, !Matched::Pair; count) at strings/util.jl:423
  ...

Stacktrace:
 [1] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("text/html")}, ::Model{Symbol("##360")}) at /home/pablo/.julia/dev/Dolo/src/printing.jl:68
 [2] limitstringmime(::MIME{Symbol("text/html")}, ::Model{Symbol("##360")}) at /home/pablo/.julia/packages/IJulia/4VL8h/src/inline.jl:36
 [3] display_dict(::Model{Symbol("##360")}) at /home/pablo/.julia/packages/IJulia/4VL8h/src/execute_request.jl:49
 [4] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [5] invokelatest at ./essentials.jl:685 [inlined]
 [6] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/pablo/.julia/packages/IJulia/4VL8h/src/execute_request.jl:197
 [7] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [8] invokelatest at ./essentials.jl:685 [inlined]
 [9] eventloop(::ZMQ.Socket) at /home/pablo/.julia/packages/IJulia/4VL8h/src/eventloop.jl:8
 [10] (::getfield(IJulia, Symbol("##12#15")))() at ./task.jl:259
sglyon commented 5 years ago

This one is a pretty simple fix.

Instead of replace("big long string", "big", "really") we should have replace("big long string", "big" => "really")

albop commented 5 years ago

Indeed. Thanks. Fixed.