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

savehtml not defined #387

Closed
claytonpbarrows opened this issue Jun 26, 2021 · 2 comments
Closed

savehtml not defined #387

claytonpbarrows opened this issue Jun 26, 2021 · 2 comments

Comments

@claytonpbarrows
Copy link

When attempting to save a SyncPlot to html, via savefig, I get the following error:

ulia> PlotlyJS.savefig(PlotlyJS.plot(p), "blah.html")
ERROR: UndefVarError: savehtml not defined
Stacktrace:
 [1] savefig(io::IOStream, p::Plot{Vector{GenericTrace{Dict{Symbol, Any}}}, Layout{Dict{Symbol, Any}}, Vector{PlotlyFrame}}; width::Nothing, height::Nothing, scale::Nothing, format::String)
   @ PlotlyBase ~/.julia/packages/PlotlyBase/HGHhS/src/kaleido.jl:145
 [2] (::PlotlyBase.var"#210#211"{Nothing, Nothing, Nothing, Plot{Vector{GenericTrace{Dict{Symbol, Any}}}, Layout{Dict{Symbol, Any}}, Vector{PlotlyFrame}}})(f::IOStream)
   @ PlotlyBase ~/.julia/packages/PlotlyBase/HGHhS/src/kaleido.jl:179
 [3] open(::PlotlyBase.var"#210#211"{Nothing, Nothing, Nothing, Plot{Vector{GenericTrace{Dict{Symbol, Any}}}, Layout{Dict{Symbol, Any}}, Vector{PlotlyFrame}}}, ::String, ::Vararg{String, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Base ./io.jl:330
 [4] open
   @ ./io.jl:328 [inlined]
 [5] savefig(p::Plot{Vector{GenericTrace{Dict{Symbol, Any}}}, Layout{Dict{Symbol, Any}}, Vector{PlotlyFrame}}, fn::String; format::Nothing, width::Nothing, height::Nothing, scale::Nothing)
   @ PlotlyBase ~/.julia/packages/PlotlyBase/HGHhS/src/kaleido.jl:178
 [6] savefig(p::Plot{Vector{GenericTrace{Dict{Symbol, Any}}}, Layout{Dict{Symbol, Any}}, Vector{PlotlyFrame}}, fn::String)
   @ PlotlyBase ~/.julia/packages/PlotlyBase/HGHhS/src/kaleido.jl:173
 [7] savefig(p::PlotlyJS.SyncPlot, a::String; k::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ PlotlyJS ~/.julia/packages/PlotlyJS/LpUSO/src/PlotlyJS.jl:49
 [8] savefig(p::PlotlyJS.SyncPlot, a::String)
   @ PlotlyJS ~/.julia/packages/PlotlyJS/LpUSO/src/PlotlyJS.jl:49
 [9] top-level scope
   @ REPL[42]:1

Versioninfo:

julia> versioninfo()
Julia Version 1.6.0
Commit f9720dc2eb (2021-03-24 12:55 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.6.0)
  CPU: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)

(test) pkg> st
      Status `~/Documents/repos/PowerGraphics.jl/test/Project.toml`
  [336ed68f] CSV v0.8.5
  [5ae59095] Colors v0.12.8
  [a93c6f00] DataFrames v1.1.1
  [864edb3b] DataStructures v0.18.9
  [60bf3e95] GLPK v0.14.12
  [2cd47ed4] InfrastructureSystems v1.10.0
  [f0f68f2c] PlotlyJS v0.16.0
  [91a5bcdd] Plots v1.16.6
  [5f7eddb3] PowerGraphics v0.10.0 `..`
  [e690365d] PowerSimulations v0.14.4
  [f00506e0] PowerSystemCaseBuilder v0.4.1
  [bcd98974] PowerSystems v1.9.0
  [98d24dd4] TestSetExtensions v2.0.0
  [9e3dc215] TimeSeries v0.22.1
  [44d3d7a6] Weave v0.10.10
  [ddb6d928] YAML v0.4.7
  [ade2ca70] Dates
  [b77e0a4c] InteractiveUtils
  [56ddb016] Logging
  [9a3f8284] Random
  [8dfed614] Test
@sglyon
Copy link
Member

sglyon commented Jun 26, 2021

Thanks @claytonpbarrows I accidentally made a breaking change here.

This PR fixes things: sglyon/PlotlyBase.jl#54

I will merge + tag a new version of PlotlyBase ASAP

@sglyon
Copy link
Member

sglyon commented Jun 26, 2021

The fix has been merged. If you update packages this should work again

Please re-open if not

@sglyon sglyon closed this as completed Jun 26, 2021
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