1

I am trying to figure out why when i ghost.capture() a webpage i get 6 errors per capture. I am using Ghost.py and PySide to capture full screen browsers.

Errors below

QT: QPainter::begin: Paint device returned engine == 0, type: 3
QT: QPainter::setRenderHint: Painter must be active to set rendering hints
QT: QPainter::setBrush: Painter not active
QT: QPainter::pen: Painter not active
QT: QPainter::setPen: Painter not active
QT: QPainter::end: Painter not active, aborted

Code:

from ghost import Ghost
url = "someurl"
dir = "somedir"
self.ghost = Ghost()
self.ghost.set_viewport_size(1920, 0)
self.ghost.open(url)
self.ghost.capture_to(dir)

I have searched online and couldn't find any simple solutions for python. The problem doesn't seem to arise 100% of the time, but i can't seem to nail down exactly why its failing on some but not others. It might have to do with heavy page animations? Either way shouldn't this still just take a screencap?

Darthlemi
  • 173
  • 1
  • 1
  • 9
  • 1
    Try adding a high timeout like 300s and see if it works since you feel it might be connected to heavy page animations. – iChux Feb 01 '16 at 11:57

0 Answers0