Skip to content

close(::Figure) still broken #22

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

Closed
IanButterworth opened this issue Mar 10, 2023 · 0 comments · Fixed by #23
Closed

close(::Figure) still broken #22

IanButterworth opened this issue Mar 10, 2023 · 0 comments · Fixed by #23

Comments

@IanButterworth
Copy link
Contributor

@stevengj The fix for #21 didn't work I'm afraid.

On main cc633dd

julia> f = PythonPlot.figure(figsize = (6, 6), dpi = 100)
Figure(<py Figure size 600x600 with 0 Axes>)

julia> close(f)
ERROR: cannot convert this Python 'NoneType' to a Julia 'Int64'
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] macro expansion
   @ ~/.julia/packages/PythonCall/dsECZ/src/convert.jl:355 [inlined]
 [3] macro expansion
   @ ~/.julia/packages/PythonCall/dsECZ/src/Py.jl:131 [inlined]
 [4] pyconvert(#unused#::Type{Int64}, x::PythonCall.Py)
   @ PythonCall ~/.julia/packages/PythonCall/dsECZ/src/convert.jl:370
 [5] plotclose(f::Figure)
   @ PythonPlot ~/.julia/packages/PythonPlot/oPo8Q/src/PythonPlot.jl:193
 [6] close(f::Figure)
   @ PythonPlot ~/.julia/packages/PythonPlot/oPo8Q/src/PythonPlot.jl:189
 [7] top-level scope
   @ REPL[4]:1

It would've been good for the fix to be made in a PR with a test added.

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

Successfully merging a pull request may close this issue.

1 participant