QPixmap is not safe to use
Closed this issue · 2 comments
zen0x90 commented
Hi,
I'm using Ghost-0.2.3, I integrate it into my project with the following code :
from ghost import Ghost
ghost = Ghost()
with ghost.start() as session:
page, extra_resources = session.open(url)
ghost.capture_to("/tmp/web.png")
And I got the following error :
- qt - WARNING - QPixmap: It is not safe to use pixmaps outside the GUI thread
[WARNING ] QT: QPixmap: It is not safe to use pixmaps outside the GUI thread
And obviously no file has been created.
So...What's wrong ?
PS: PySide-1.2.4
zen0x90 commented
Never mind, that's better to use selenium and its headless.
http://rachbelaid.com/capturing-screenshots-of-website-with-python/
EvaSDK commented
You just needed to use capture_to
in the session
context.