JuliaPy / JuliaPy/PyPlot.jl

exception after closing the window

Offen
#459 6 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Julia
Sterne
488
Forks
90
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

The script is like this:
```julia
# plot.jl
using PyPlot

plot([2,4], [3,8])
show()
```
and then I run the script in a terminal.
It shows a window displaying the plot. Everything is fine until the window is closed.

The error message is the following:
```julia
ERROR: LoadError: PyError ($(Expr(:escape, :(ccall(#= /home/mine/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:44 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw)))))
TypeError('signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object')
File "/usr/lib/python3.7/site-packages/matplotlib/pyplot.py", line 269, in show
return _show(*args, **kw)
File "/usr/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py", line 413, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 3302, in show
cls.mainloop()
File "/usr/lib/python3.7/site-packages/matplotlib/backends/backend_qt5.py", line 1099, in mainloop
signal.signal(signal.SIGINT, old_signal)
File "/usr/lib/python3.7/signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))

Stacktrace:
[1] pyerr_check at /home/mine/.julia/packages/PyCall/ttONZ/src/exception.jl:60 [inlined]
[2] pyerr_check at /home/mine/.julia/packages/PyCall/ttONZ/src/exception.jl:64 [inlined]
[3] macro expansion at /home/mine/.julia/packages/PyCall/ttONZ/src/exception.jl:84 [inlined]
[4] __pycall!(::PyCall.PyObject, ::Ptr{PyCall.PyObject_struct}, ::PyCall.PyObject, ::Ptr{Nothing}) at /home/mine/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:44
[5] _pycall!(::PyCall.PyObject, ::PyCall.PyObject, ::Tuple{}, ::Int64, ::Ptr{Nothing}) at /home/mine/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:29
[6] #pycall#109 at /home/mine/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:11 [inlined]
[7] pycall at /home/mine/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:83 [inlined]
[8] #show#148 at /home/mine/.julia/packages/PyPlot/4wzW1/src/PyPlot.jl:183 [inlined]
[9] show() at /home/mine/.julia/packages/PyPlot/4wzW1/src/PyPlot.jl:183
[10] top-level scope at /home/mine/Work/TDGL/src/plot.jl:5
in expression starting at /home/mine/Work/TDGL/src/plot.jl:5

```

My julia version is 1.2.0.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.