TimeoutError: Unable to load requested page
Closed this issue · 1 comments
ambross commented
I am using Ghost.py 0.2.3 version and here is my code look lik
from ghost import Ghost
ghost = Ghost()
with ghost.start() as session:
page, extra_resources = session.open("https://github.com")
print page.content
Response is always
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/usr/local/lib/python2.7/dist-packages/ghost/ghost.py", line 901, in open
return self.wait_for_page_loaded(timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/ghost/ghost.py", line 1196, in wait_for_page_loaded
'Unable to load requested page', timeout)
File "/usr/local/lib/python2.7/dist-packages/ghost/ghost.py", line 1174, in wait_for
raise TimeoutError(timeout_message)
ghost.ghost.TimeoutError: Unable to load requested page
EvaSDK commented
Default timeout (8 seconds iirc) is kinda short depending on your connection as PyQt/PySide is rather slow on I/Os for some reason. The provided code works for me with both PySide and PyQt on both 0.2.3 release and current ghost-py-0-2 branch. Please add a logging.basicConfig(level=logging.DEBUG)
to your script to enable verbose logs. It will give you a more detailled view of what's going on and what's slow. Closing due to the absence of logs but do not hesitate to reopen if there is an actual bug.