Tkinter deallocation warnings after plotting tests
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- matplotlib, python
- Ambito
- backend, testing-qa
Direzione di ricerca
Start with the three named tests in tests/integration/test_contour_plot_examples.py and reproduce the warnings in the stated Python 3.14, pytest and matplotlib environment. Trace how those tests create and clean up figures and Tkinter objects, then check whether cleanup occurs outside the GUI event loop. Done means the deallocation warnings are resolved and the integration tests pass; the issue does not identify a fix or more specific files to inspect.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Warnings are emitted during the integration test suite when Tkinter objects are finalised:
PytestUnraisableExceptionWarning:
Exception ignored while calling deallocator
<function Variable.__del__ ...>
RuntimeError: main thread is not in main loop
The same error also occurs in tkinter.Image.__del__, where Tkinter attempts to delete an image from the Tcl/Tk interpreter.
The warnings have been observed in association with the following tests:
test_example_29_global_average_annual_temperaturetest_example_7_lat_pressure_zonal_meantest_example_10_latitude_time_hovmuller
emerging there in practice as:
tests/integration/test_contour_plot_examples.py::test_example_10_latitude_time_hovmuller
/home/slb93/miniconda3/envs/cfplot-test-env/lib/python3.14/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function Image.__del__ at 0x7f6ee9513530>: None
Traceback (most recent call last):
File "/home/slb93/miniconda3/envs/cfplot-test-env/lib/python3.14/tkinter/__init__.py", line 4332, in __del__
self.tk.call('image', 'delete', self.name)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: main thread is not in main loop
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
The warnings appear to arise during GUI-object cleanup rather than directly from the plotting operations. The available traceback does not yet establish whether figures or Tkinter objects are being retained beyond the lifetime of the GUI event loop, or whether this is a Matplotlib/Tkinter backend cleanup issue.
Environment
- Python: 3.14
- Test framework: pytest
- Plotting library: matplotlib
- GUI library involved in traceback: Tkinter
- Environment:
cfplot-test-env
- Lingua principale
- Python
- Stelle
- 21
- Fork
- 11
- Merge medio
- 3g 8h
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NCAS-CMS/cf-plot
-
Add badges to READMEApertadocs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
dependencies infrastructure installation testing
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 3/5 Mezza giornata Idoneità per principianti 45/100
-
`title` not showing for `con` with certain projectionsForse già presa @sadielbartholomew l’ha presa 1 giorno fa. Apertabug plotting
Tutte le issue di NCAS-CMS/cf-plot
Issue simili
-
bug module:nodes tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rocketride-org/rocketride-server#3020 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
bretterer/home-assistant-rivian#335 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
mampfes/hacs_waste_collection_schedule#8114 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TIGER-AI-Lab/ClawBench#475 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
UKGovernmentBEIS/inspect_ai#6322 ·
I maintainer di solito rispondono entro 1 giorno