Questions tagged [gevent]

Gevent is a coroutine-based Python networking library that uses greenlet to provide a high-level synchronous API on top of libevent (libev after 1.0) event loop.

Gevent is a coroutine-based Python networking library that uses greenlet to provide a high-level synchronous API on top of libevent (libev after 1.0) event loop.

1147 questions
0
votes
1 answer

`internal error in evhttp` using gevent

I have a file with million urls like: the data file is…
kuafu
  • 1,466
  • 5
  • 17
  • 28
0
votes
1 answer

Deploying gnotty as part of a django project and getting: gaierror: [Errno -5] No address associated with hostname

Attempting to deploy a django project with gnotty as part of it, which works perfectly well on the localhost but as soon as I deployed and changed the GNOTTY_HOST to my domain, the GNOTTY_PORT to 80, and the GNOTTY_DAEMON to True, as well as the pid…
Nader Alexan
  • 2,127
  • 22
  • 36
0
votes
1 answer

Are translations greenlet-safe in Django?

After taking a look at Django's source code, I see that Django stores the active language in the current thread. In django.utils.translation.trans_real: _active = local() ... def activate(language): """ Fetches the translation object for a…
MiniQuark
  • 46,633
  • 36
  • 147
  • 183
0
votes
1 answer

Converting and Unifying API data in Python

I'm trying to pull similar data in from several third party APIs, all of which have slightly varying schemas, and convert them all into a unified schema to store in a DB and expose through a unified API. This is actually a re-write of a system that…
Andres
  • 2,880
  • 4
  • 32
  • 38
0
votes
1 answer

newrelic-1.10.2.38/newrelic/api/web_transaction.py self.generator.close() kicking up IOError

Using uwsgi 1.4.2 (gevent = 100) with newrelic, I am encountering repeated errors [pid: 24340|app: 0|req: 1335/4305] 199.27.128.147 () {54 vars in 722 bytes} [Fri Mar 22 16:49:41 2013] HEAD / => generated 0 bytes in 158 msecs (HTTP/1.1 200) 5…
Calvin Cheng
  • 35,640
  • 39
  • 116
  • 167
0
votes
1 answer

Progress Bar and gevent

When using gevent(1.0b4) to download html files, I want to use a progress bar to display progress. I wrote the code below, but the code always exists some errors. I hope someone can help! file_path='temp' url_count=len(urls) def…
Matt Elson
  • 4,177
  • 8
  • 31
  • 46
0
votes
1 answer

Gevent crashes python. Core dumped(refcount was too small). Whats wrong?

I'm trying to build a proxy/cache server for one location autocompletion api. Here is the simplified code that manifests the error almost all the time I try to query my server: #!/usr/bin/python import gevent from gevent import monkey from…
Ivan Kovacevic
  • 1,322
  • 12
  • 30
0
votes
1 answer

Waiting for both gevent socket and redis blocking blpop

I'm using a gevent StreamServer to handle incoming connections from clients. After the clients are connected, the client will send some messages to the server, and the server will process it. Everything works fine on this side. But now and then the…
Awi
  • 3
  • 2
0
votes
2 answers

socketio in python

Kindly help me in configuring the socketio in my django module. Am using windows7 OS File wsgi.py Sample Code - from socketio import SocketIOServer Error - Unresolved import:SocketIOServer Am new to python and Django Frameworks.!
nash
  • 1
0
votes
1 answer

Using IPv6 socket with GEvent WSGIServer

I'm trying to bind WSGIServer to a IPv6 loopback address: import socket import gevent from gevent.pywsgi import WSGIServer addrs = socket.getaddrinfo('::1', 8000, socket.AF_INET6, 0, socket.SOL_TCP) bind_spec = addrs[0][-1] listener =…
Eugene Pankov
  • 856
  • 1
  • 15
  • 30
0
votes
0 answers

Redis and django-socketio

I built a chat with django-socketio and I'm trying to use redis with it. I have a very simple event.py: @events.on_message(channel='^channel-') def messages(request, socket, context, message): …
Marcolac
  • 901
  • 4
  • 14
  • 27
0
votes
1 answer

Running remote_api_shell.py with gevent

I have a relatively simple script I use to run map jobs over my data, and I'd like it to run a faster by using gevent to make reads from the datastore non-blocking. I tried adding gevent.monkey.patch_socket() to the top of remote_api_shell.py, but…
Andrey Fedorov
  • 9,148
  • 20
  • 67
  • 99
0
votes
1 answer

gevent static file rendering

How to serve static files like css with a WSGI application written using werkzeug and pure python.. No frameworks used.. this is my server.. from gevent import pywsgi from Index import application import os application =…
rakesh
  • 975
  • 2
  • 11
  • 15
0
votes
2 answers

gevent pool.wait_available() method meaning

Look, people. We have a question about gevent.pool class and pool.wait_available() method, both code snippets 1. def fetch(url): print 'start fetching...', url data = urllib2.urlopen(url) print url,':',data.code urls =…
Ellochka Cannibal
  • 1,750
  • 2
  • 19
  • 31
0
votes
2 answers

Queue in flask with websocket

I am using Flask, Gevent and scrapy for a project. The basic idea is that you enter a url and it starts a crawler process with the input as the arguments. It currently seems to be working well with the output piped through websocket. I am curious…
viperfx
  • 327
  • 5
  • 17