python and ghost crash

0

I'm trying to get ghost to work with python and have followed instructions for installation on http://ghostpy.readthedocs.org/en/latest/ but as soon as I run

from ghost import Ghost
gh = Ghost 

it throws the error

Process finished with exit code -1073740771 (0xC000041D)

When I run

import PySide
print(PySide.QtCore.__version__)
print(PySide.__version__)

it gives me

4.8.5
1.2.2

suggesting both QTCore and PySide are installed according to instructions. Does anyone know how to troubleshoot this?

I'm using Python 3.4 and together with pycharm 4.0.5.

python
pyside
qtcore
ghost
asked on Stack Overflow Mar 29, 2015 by Nattljus • edited Mar 29, 2015 by andrewsi

1 Answer

4

You typed gh = Ghost without parentheses (). It should be as such:

gh = Ghost()

From the docs:

from ghost import Ghost

url = "http://www.ebay.com/"
gh = Ghost() #RIGHT HERE

# We load the main page of ebay
page, resources = gh.open(url, wait_onload_event=True)

# Full the main bar and click on the search button
gh.set_field_value("#gh-ac", "plane")
gh.click("#gh-btn")

# Wait for the next page
gh.wait_for_selector("#e1-15")

# Save the image of the screen
gh.capture_to("plane.png")
answered on Stack Overflow Mar 29, 2015 by A.J. Uppal

User contributions licensed under CC BY-SA 3.0