蟒蛇和幽灵崩溃

时间:2015-03-29 00:19:50

标签: python pyside qtcore ghost

我试图让ghost使用python并按照http://ghostpy.readthedocs.org/en/latest/的说明安装,但是一旦我运行

from ghost import Ghost
gh = Ghost 

它会抛出错误

  

处理完成,退出代码为-1073740771(0xC000041D)

当我跑步时

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

它给了我

4.8.5
1.2.2

建议根据说明安装QTCore和PySide。有谁知道如何解决这个问题?

我使用Python 3.4并与pycharm 4.0.5一起使用。

1 个答案:

答案 0 :(得分:4)

您输入的gh = Ghost没有括号()。它应该是这样的:

gh = Ghost()

来自文档:

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")
相关问题