Parser.jl:140 & kaleido.jl:104 & savefig() & large number of points
StefanPofahl opened this issue · comments
Describe the bug
plot() command can be executed, attempt to save plot to file fails.
The error is reproducable, it is related to the amount of points that should be plotted.
An example code to reproduce the error is given here:
Example Code
One error message is:
ERROR: Unexpected end of input
Line: 0
Around: ......
^
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] _error(message::String, ps::JSON.Parser.MemoryParserState)
@ JSON.Parser C:\Users\stefanpofahl\.julia\packages\JSON\NeJ9k\src\Parser.jl:140
Another error message is:
ERROR: IOError: write: end of file (EOF)
Stacktrace:
[1] uv_write(s::Base.PipeEndpoint, p::Ptr{UInt8}, n::UInt64)
@ Base .\stream.jl:1010
[2] unsafe_write(s::Base.PipeEndpoint, p::Ptr{UInt8}, n::UInt64)
@ Base .\stream.jl:1064
[3] unsafe_write
@ .\io.jl:362 [inlined]
[4] write
@ .\strings\io.jl:244 [inlined]
[5] write
@ .\strings\basic.jl:749 [inlined]
[6] savefig(p::Plot{Vector{GenericTrace{Dict{Symbol, Any}}}, Layout{Dict{Symbol, Any}}, Vector{PlotlyFrame}}; width::Nothing, height::Nothing, scale::Nothing, format::String)
@ PlotlyJS C:\Users\stefanpofahl\.julia\packages\PlotlyJS\4jzLr\src\kaleido.jl:98
[7] savefig(p::PlotlyJS.SyncPlot; kwargs::Base.Pairs{Symbol, Union{Nothing, String}, NTuple{4, Symbol}, NamedTuple{(:width, :height, :scale, :format), Tuple{Nothing, Nothing, Nothing, String}}}) @ PlotlyJS C:\Users\stefanpofahl\.julia\packages\PlotlyJS\4jzLr\src\kaleido.jl:71
[8] savefig(io::IOStream, p::PlotlyJS.SyncPlot; width::Nothing, height::Nothing, scale::Nothing, format::String)
@ PlotlyJS C:\Users\stefanpofahl\.julia\packages\PlotlyJS\4jzLr\src\kaleido.jl:154
[9] (::PlotlyJS.var"#36#37"{Nothing, Nothing, Nothing, PlotlyJS.SyncPlot})(f::IOStream)
@ PlotlyJS C:\Users\stefanpofahl\.julia\packages\PlotlyJS\4jzLr\src\kaleido.jl:187
[10] open(::PlotlyJS.var"#36#37"{Nothing, Nothing, Nothing, PlotlyJS.SyncPlot}, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base .\io.jl:330
[11] open
@ .\io.jl:328 [inlined]
[12] savefig(p::PlotlyJS.SyncPlot, fn::String; format::Nothing, width::Nothing, height::Nothing, scale::Nothing)
@ PlotlyJS C:\Users\stefanpofahl\.julia\packages\PlotlyJS\4jzLr\src\kaleido.jl:186
[13] savefig
@ C:\Users\stefanpofahl\.julia\packages\PlotlyJS\4jzLr\src\kaleido.jl:181 [inlined]
[14] plot_single_spectra(_indx::Int64, _s_fn::String)
@ Main c:\data\julia\scripts\test\clemens\Test_Clemens_FFT.jl:604
[15] top-level scope
@ c:\data\julia\scripts\test\clemens\Test_Clemens_FFT.jl:616
See also:
PlotlyJS & savefig
Version info
- output of julia command
versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS =
-
Output running the following in Julia 0.7 or greater:
using Pkg; pkg"status"
(if you are on Julia 0.6 or earlier runPkg.status()
)Status
C:\Users\stefanpofahl\.julia\environments\v1.7\Project.toml
[c52e3926] Atom v0.12.38
[aae01518] BandedMatrices v0.17.2
[6e4b80f9] BenchmarkTools v1.3.1
[f44e861a] BitsFields v0.2.1
[ad839575] Blink v0.12.5
[a74b3585] Blosc v0.7.3
[336ed68f] CSV v0.10.4
[944b1d66] CodecZlib v0.7.0
[8f4d0f93] Conda v1.7.0
[717857b8] DSP v0.7.6
[a93c6f00] DataFrames v1.3.4
[864edb3b] DataStructures v0.18.13
[5721bf48] DataVoyager v1.0.2
[39dd38d3] Dierckx v0.5.2
[a1bb12fb] Electron v3.1.2
[7a1cc6ca] FFTW v1.5.0
[5789e2e9] FileIO v1.14.0
[8fc22ac5] FilePaths v0.8.3
[48062228] FilePathsBase v0.9.18
[d9b5fb6a] Findpeaks v0.1.0https://github.com/tungli/Findpeaks.jl.git#master
[59287772] Formatting v0.4.2
[38e38edf] GLM v1.8.0
[28b8d3ca] GR v0.64.4
[4b11ee91] Gaston v1.0.5
[c27321d9] Glob v1.3.0
[c8ec2601] H5Zblosc v0.1.0
[f67ccb44] HDF5 v0.16.10
[916415d5] Images v0.25.2
[a98d9a8b] Interpolations v0.13.6
[033835bb] JLD2 v0.4.22
[682c06a0] JSON v0.21.3
[e5e0dc1b] Juno v0.8.4
[23992714] MAT v0.10.3
[da04e1cc] MPI v0.19.2
[442fdcdd] Measures v0.3.1
[13ad621a] MyLib_HelloWorld v0.1.0C:\data\julia\MyLib\test\MyLib_HelloWorld
[c9880795] OCReract v1.1.1
[8314cec4] PGFPlotsX v1.5.0
[69de0a69] Parsers v2.3.2
[d254efa0] PkgSkeleton v0.4.0
[f0f68f2c] PlotlyJS v0.18.8
[91a5bcdd] Plots v1.31.1
[92933f4c] ProgressMeter v1.7.2
[438e738f] PyCall v1.93.1https://github.com/JuliaPy/PyCall.jl.git#master
[295af30f] Revise v3.3.3
[d6ea1423] RobustModels v0.4.3
[ebc72ef8] SciPy v0.1.1https://github.com/AtsushiSakai/SciPy.jl.git#master
[11a47235] SignalDecomposition v1.0.4https://github.com/JuliaDynamics/SignalDecomposition.jl.git#master
[276daf66] SpecialFunctions v2.1.6
[2913bbd2] StatsBase v0.33.18
[fdbf4ff8] XLSX v0.7.10
[56ddb016] Logging
[44cfe95a] Pkg
[9a3f8284] Random
[6462fe0b] Sockets