使用Ghost.py的Python.exe appcrash

时间:2014-03-06 15:14:26

标签: python crash ghost.py

我正在使用Ghost.py

    from ghost import Ghost
    url = "http://www.kiev.prom.ua"
    gh = Ghost()
    page, page_name = gh.create_page()
    page_resource = page.open(url, wait_onload_event=True)

当我运行上面的脚本时,Python崩溃了:

Problem Event Name: APPCRASH 
   Application Name: python.exe 
   Application Version: 0.0.0.0 
   Application Timestamp: 4c303241 
   Name of the module with the error: python27.dll 
   Version of the module with the error: 2.7.5150.1013 
   The time stamp module with the error: 5237f3d5 
   Exception Code: c0000005 
   Exception Offset: 00107f7a 
   OS Version: 6.1.7601.2.1.0.256.1 
   Language Code: 1049 
   Additional Information 1: 0a9e 
   Additional information 2: 0a9e372d3b4ad19135b953a78882e789 
   Additional Information 3: 0a9e 
   Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

如何找到此问题的根源?

1 个答案:

答案 0 :(得分:1)

通常当你遇到这样的崩溃而不是常规的Python exceptions时,问题出在C代码的某个地方,通常是在第三方库中。

您提供了一个产生错误的最小程序,这很棒。我自己从来没有使用Ghost,所以这个答案只是我最好的猜测,因为你还没有得到任何其他答案。

尝试让您的计划更加轻微。以下程序是否也崩溃了?

from ghost import Ghost
gh = Ghost()

如果没有,您使用的方法之一是错误的吗?仔细阅读the Ghost documentation确保您以正确的方式使用图书馆。例如,我找到了方法create_page,但仅限于在线documentation that seems a bit outdated。有一些文档here as well

获取最新版本的库并使用随附的文档,或自行生成。

最后,文档还说明了有关PyQt / PySide的内容:

  

首先,您需要安装PyQt或PySide。这将需要安装   首先是QT框架。您可以在以下链接中找到PyQt   http://www.riverbankcomputing.com/software/pyqt/download

所以问题可能还在于你的PyQt / PySide安装,但我认为这不是StackOverflow的问题。