Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spynner "timeout reached" #72

Open
the-efi opened this issue Nov 11, 2014 · 3 comments
Open

Spynner "timeout reached" #72

the-efi opened this issue Nov 11, 2014 · 3 comments

Comments

@the-efi
Copy link

the-efi commented Nov 11, 2014

On a new Ubuntu Server 14.04.1 LTS:

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install python-pip libpython2.7-dev  libx11-dev libxtst-dev libpng12-dev
sudo pip install autopy
sudo apt-get install python-qt4 libxml2-dev libxslt1-dev python-dev 
sudo pip install spynner
sudo pip install ipython
Xvfb :0 -ac -screen 0 1024x768x16 &
export DISPLAY=:0
ipython


>import spynner
>spynner_browser = spynner.Browser()
>spynner_browser.load("http://www.docusign.com", load_timeout=12000)
---------------------------------------------------------------------------
SpynnerTimeout                            Traceback (most recent call last)
<ipython-input-5-b84d2418ab9f> in <module>()
----> 1 spynner_browser.load("http://www.docusign.com", load_timeout=120)

/usr/local/lib/python2.7/dist-packages/spynner/browser.pyc in load(self, url, load_timeout, wait_callback, tries, operation, body, headers)
    546         self.webframe.load(req, operation, body)
    547         if wait_callback is None:
--> 548             return self._wait_load(timeout = load_timeout)
    549         else:
    550             return self.wait_for_content(wait_callback, tries=tries, delay=load_timeout)

/usr/local/lib/python2.7/dist-packages/spynner/browser.pyc in _wait_load(self, timeout)
    438         while self._load_status is None:
    439             if timeout and time.time() - itime > timeout:
--> 440                 raise SpynnerTimeout("Timeout reached: %d seconds" % timeout)
    441             self._events_loop()
    442         self._events_loop(0.0)

SpynnerTimeout: Timeout reached: 120 seconds

This timeouts no matter what timeout I choose.

@kiorky
Copy link
Owner

kiorky commented Dec 4, 2014

Please try other websites, docusign must block you (ip, user agent, etc)

@the-efi
Copy link
Author

the-efi commented Dec 7, 2014

It's not, as I am able to open the page using ghost.py, Selenium with Chrome, and Phantomjs on the same machine at the same time.

@joshwget
Copy link

joshwget commented Jan 4, 2015

I run into the same problem when running Python in interactive mode. Sometimes a timeout doesn't even occur and it just hangs.

My guess is this is the same problem as in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants