finplot icon indicating copy to clipboard operation
finplot copied to clipboard

[BUG] Animations print "QPainter::drawPicture: Painter not active" upon every refresh

Open alexandercommon opened this issue 1 year ago • 3 comments

  • [X] I realize finplot is not a web lib. (Hint: it's native!)
  • [X] I've read the snippets and not found what I'm looking for.
  • [X] I've searched for any related issues and avoided creating a duplicate issue.
  • [X] I've updated finplot (pip install -U finplot).
  • [X] I've supplied the required data to run my code below.

Code to reproduce

https://github.com/highfestiva/finplot/blob/master/finplot/examples/animate.py

Describe the bug

No matter what I do, whenever I run an animation it prints "QPainter::drawPicture: Painter not active". This happens in my own code, and in the example code. Although the plotting seems to be working fine, that I can see.

Expected behavior

It would be nice if this didn't do this. I can't use the console if it's doing this.

Screenshots

Probably not needed.

Reproducible in:

OS: Windows 10 22H2 - build 19045.3803 finplot version: Version: 1.9.3 pyqtgraph version: 0.13.3 pyqt version: 6.6.1

alexandercommon avatar Jan 04 '24 15:01 alexandercommon

I solved this, just submitting for others to be aware of.

The issue was solved by downgrading pyqt to version 5.

alexandercommon avatar Jan 04 '24 15:01 alexandercommon

This is something new in the new PyQt6 or perhaps Qt6. Don't know if it's a bug on their side, but I'll keep my eye on it, and if they don't fix it soon I'll investigate further. Please keep open.

highfestiva avatar Jan 07 '24 22:01 highfestiva

I found the bug on my end, it should be fixed in 23a92b1c24c523f1f5b78a94003f5a9c444919e6. Also, please use PyQt6 instead of PyQt5, as the previous version is no longer supported.

highfestiva avatar Jan 09 '24 13:01 highfestiva