Comments (9)
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.
I'm seeing similar issues on Mac OSX with libevent installed via brew, gevent 1.0b2 (tried the stable release) and grequests.
from grequests.
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.
all works here on macosx . on linux i tried gevent 0.13.x and 1.0b2 but still get the same error
from grequests.
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.
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.
Huh? Isn't that correct?
The request is timing out? The problem was that timeouts were not occuring.
from grequests.
oops my bad. did not use safe_mode=True. but that's another issue with grequests. Thanks
from grequests.
Please fix this 👍
from grequests.
Related Issues (20)
- Grequests is creating Recursion errors due to invalid monkey patch HOT 3
- response is None HOT 4
- Grequest returns empty generators HOT 2
- How to convert response for a json HOT 1
- limit number of requests per second. HOT 1
- why size is no affect in map? HOT 1
- Add index in imap HOT 3
- Params of get/post functions HOT 3
- Import fails HOT 1
- Grequests warning and crash HOT 3
- Docker crash HOT 2
- Request for image HOT 2
- Append wait time or rate for every thread due to server limits HOT 1
- Python 3.6 the fastest environment?
- Python 3.6 the fastest environment? HOT 2
- gtimeout does not works with imap_enumerated HOT 1
- Flag to print the request being executed HOT 2
- How to ignore SSL cert verification failed in grequests? HOT 2
- grequests.map() is slow when passing requests with the data parameter HOT 2
- nose should be in `dev_requirements.txt`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grequests.