tohojo / flent

The FLExible Network Tester.
https://flent.org
Other
428 stars 79 forks source link

WARNING: Unable to build our own tight layout: 'Figure' object has no attribute '_cachedRenderer' #291

Closed hnyman closed 6 months ago

hnyman commented 6 months ago

I am recently getting a warning when flent run ends in Ubuntu 23.10 Flent 2.1.1, Python 3.11.6, matplotlib v3.6.3, numpy v1.24.2

WARNING: Unable to build our own tight layout: 'Figure' object has no attribute '_cachedRenderer'

Context:

flent ipv4 80s netperf-eu.bufferbloat.net MT6000_wired_piececake44_550_190
Starting Flent 2.1.1 using Python 3.11.6.
Starting rrul test. Expected run time: 90 seconds.
Data file written to ./rrul-2024-01-13T194543.982799.MT6000_wired_piececake44_550_190.flent.gz
Initialised matplotlib v3.6.3 on numpy v1.24.2.
WARNING: Unable to build our own tight layout: 'Figure' object has no attribute '_cachedRenderer'
la 13.1.2024 19.47.20 +0200

The rrul data looks ok and also the .PNG file is produced, but looks a bit strange as text overlaps the topmost graph. Apparently the layout deviates from the requested one.

MT6000_wired_piececake44_550_190

tohojo commented 6 months ago

Thank you for the report! Could you please test if #294 fixes this issue for you?

hnyman commented 6 months ago

Yes, #294 seems to fix it:

flent ipv4 80s netperf-eu.bufferbloat.net koe_1_2_3_4
Starting Flent 2.1.1 using Python 3.11.6.
Starting rrul test. Expected run time: 90 seconds.
Data file written to ./rrul-2024-01-16T181447.932349.koe_1_2_3_4.flent.gz
Initialised matplotlib v3.6.3 on numpy v1.24.2.
ti 16.1.2024 18.16.19 +0200

koe_1_2_3_4

Curiously, I noticed that there is also a warning related to flent-gui:

perus@ub2310:/Openwrt/flent$ flent-gui 
Starting Flent 2.1.1 using Python 3.11.6.
Initialised matplotlib v3.6.3 on numpy v1.24.2.
QSocketNotifier: Can only be used with threads started with QThread
GUI loaded. Using Qt through pyqt5 v5.15.10.
tohojo commented 6 months ago

Hannu Nyman @.***> writes:

Yes, #294 seems to fix it:

Cool, thanks for testing!

Curiously, I noticed that there is also a warning related to flent-gui:

***@***.***:/Openwrt/flent$ flent-gui 
Starting Flent 2.1.1 using Python 3.11.6.
Initialised matplotlib v3.6.3 on numpy v1.24.2.
QSocketNotifier: Can only be used with threads started with QThread
GUI loaded. Using Qt through pyqt5 v5.15.10.

This seems to be related to Qt and Wayland: https://stackoverflow.com/questions/69000574/when-i-run-cv-imshow-i-got-error-qsocketnotifier-can-only-be-used-with-thread/69007960#69007960

Not sure there's anything we can do to avoid that on the Flent side...