Pergunta

I'm using 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)

When I run the above script, Python crashes:

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

How can I find the source of this problem?

Foi útil?

Solução

Usually when you get crashes like this instead of regular Python exceptions, the problem is somewhere in the C code, and usually in a third party library.

You have provided a minimal program that produces your error, which is great. I've never used Ghost myself, so this answer is just my best guesses since you haven't gotten any other answers yet.

Try to make your program even more minimal. Does the following program also crash?

from ghost import Ghost
gh = Ghost()

If not, are you using one of the methods the wrong way? Read the Ghost documentation carefully and make sure that you're using the library in the correct way. For example, I found the method create_page, but only in an online documentation that seems a bit outdated. There is some documentation here as well.

Get the latest version of the library and use the included documentation, or generate it yourself.

Finally, the documentation also says the following about PyQt/PySide:

First you need to install PyQt or PySide. This will require to install the QT framework first. You can find PyQt in the following link http://www.riverbankcomputing.com/software/pyqt/download

So the problem might also be with your PyQt/PySide installation, but that's not a question for StackOverflow I think.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top