我用的是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我怎样才能找到这个问题的根源呢?
发布于 2014-03-11 09:58:44
通常,当您遇到这样的崩溃而不是常规的Python异常时,问题就在C代码中的某个地方,而且通常是在第三方库中。
您提供了一个最小的程序来产生您的错误,这是很好的。我从来没有使用过幽灵本人,所以这个答案只是我最好的猜测,因为你还没有得到任何其他答案。
试图使您的程序更少的。下面的程序也会崩溃吗?
from ghost import Ghost
gh = Ghost()如果没有,您是否使用了错误的方法之一?仔细阅读幽灵文献和,确保您以正确的方式使用库。例如,我找到了create_page方法,但只在在线似乎有点过时的文档中找到。这里有一些文档这里也是。
获取库的最新版本并使用包含的文档,或者自己生成它。
最后,文档还介绍了关于PyQt/PySide的以下内容:
首先,您需要安装PyQt或PySide。这需要首先安装QT框架。您可以在下面的链接PyQt中找到http://www.riverbankcomputing.com/software/pyqt/download
因此,这个问题也可能与您的PyQt/PySide安装有关,但我认为这不是StackOverflow的问题。
https://stackoverflow.com/questions/22228496
复制相似问题