Skip to content

Commit

Permalink
put reading the __version__ from the pyplot package in try catch sinc…
Browse files Browse the repository at this point in the history
…e it can fail (#43)
  • Loading branch information
stevengj authored Oct 29, 2024
1 parent 93dfb2e commit 06136e2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/init.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ function __init__()
ccall(:jl_generating_output, Cint, ()) == 1 && return nothing
isjulia_display[] = isdisplayok()
PythonCall.pycopy!(matplotlib, pyimport("matplotlib"))
mvers = pyconvert(String, matplotlib.__version__)
global version = try
vparse(mvers)
vparse(pyconvert(String, matplotlib.__version__))
catch
v"0.0.0" # fallback
end
Expand Down

0 comments on commit 06136e2

Please sign in to comment.