colin
colin

Reputation: 41

gevent 'StreamServer' object has no attribute 'pre_start'?

i install python and gevent on my mac, but when i try to use

s = StreamServer(xx,xx)
s.pre_start()

it gets error:'StreamServer' object has no attribute 'pre_start'?

the version information of python and gevent: Python 2.7.5 Gevent 1.0.1

Upvotes: 0

Views: 304

Answers (2)

Tim
Tim

Reputation: 43334

In the source code for server.py, where StreamServer is implemented, you can see that it inherits from BaseServer.

BaseServer itself is implemented in baseserver.py

A quick look at these two files reveals that neither StreamServer nor BaseServer has an attribute pre_start, that is why you get an error when you try to call .pre_start() on a variable of type StreamServer.

I do not know what it is you're trying to accomplish, but you're gonna have to do it another way.

Upvotes: 0

Related Questions