Giter Club home page Giter Club logo

Comments (9)

xianyunwuxin avatar xianyunwuxin commented on July 24, 2024

It seems you are using gevent 0.13.x, you can upgrade to 1.0b2(http://code.google.com/p/gevent/downloads/detail?name=gevent-1.0b2.tar.gz&can=2&q=), or using gevent's Timeout instead of requests' timeout parameter

from grequests.

dhilton avatar dhilton commented on July 24, 2024

I'm seeing similar issues on Mac OSX with libevent installed via brew, gevent 1.0b2 (tried the stable release) and grequests.

from grequests.

JakeAustwick avatar JakeAustwick commented on July 24, 2024

On OSX, and also seeing this issue. The request simply hangs, and never returns. This simply brings the whole script to a halt.

Any suggestions?

Following code shows hanging behaviour:

>>> urls = ['http://www.whatzonip.com/wiki9/index.php?title=Special:UserLogin&type=signup']
>>> rs = (grequests.get(u, timeout=2) for u in urls)
>>> grequests.map(rs)

from grequests.

jassinm avatar jassinm commented on July 24, 2024

all works here on macosx . on linux i tried gevent 0.13.x and 1.0b2 but still get the same error

from grequests.

JakeAustwick avatar JakeAustwick commented on July 24, 2024

You have to use the gevent on github. There has been a patch applied that fixes this, however it's not released in any format yet. Clone the gevent githubo repo and build gevent from there.

from grequests.

jassinm avatar jassinm commented on July 24, 2024

thanks installed from github but JakeAustwick code for example still produces:

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/gevent/greenlet.py", line 328, in run
    result = self._run(*self.args, **self.kwargs)
  File "/home/vagrant/.virtualenv/rotw/local/lib/python2.7/site-packages/requests/models.py", line 607, in send
    raise Timeout(e)
Timeout: HTTPConnectionPool(host='www.whatzonip.com', port=80): Request timed out. (timeout=2)
<Greenlet at 0x1c36690: <bound method Request.send of <Request [GET]>>(prefetch=True)> failed with Timeout


pip freeze | grep gevent
gevent==1.0dev

from grequests.

JakeAustwick avatar JakeAustwick commented on July 24, 2024

Huh? Isn't that correct?

The request is timing out? The problem was that timeouts were not occuring.

from grequests.

jassinm avatar jassinm commented on July 24, 2024

oops my bad. did not use safe_mode=True. but that's another issue with grequests. Thanks

from grequests.

jamesbennet avatar jamesbennet commented on July 24, 2024

Please fix this 👍

from grequests.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.