Skip to content

Commit

Permalink
put reading the __version__ from the pyplot package in try catch si…
Browse files Browse the repository at this point in the history
…nce it can fail (#594)

* put reading the `__version__` from the pyplot package in try catch since it can fail

* Update src/init.jl

Co-authored-by: Steven G. Johnson <[email protected]>

---------

Co-authored-by: Steven G. Johnson <[email protected]>
  • Loading branch information
KristofferC and stevengj authored Oct 29, 2024
1 parent 00119f8 commit 2525681
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 @@ -172,9 +172,8 @@ function __init__()
ccall(:jl_generating_output, Cint, ()) == 1 && return nothing
isjulia_display[] = isdisplayok()
copy!(matplotlib, pyimport_conda("matplotlib", "matplotlib"))
mvers = matplotlib.__version__
global version = try
vparse(mvers)
vparse(matplotlib.__version__)
catch
v"0.0.0" # fallback
end
Expand Down

0 comments on commit 2525681

Please sign in to comment.