【问题标题】:python and ghost crashpython和ghost崩溃
【发布时间】:2015-03-29 00:19:50
【问题描述】:

我正在尝试让 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。

【问题讨论】:

    标签: python pyside qtcore ghost


    【解决方案1】:

    您输入了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")
    

    【讨论】:

      猜你喜欢
      • 2017-06-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多