-
Notifications
You must be signed in to change notification settings - Fork 3k
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
problem with select library #274
Comments
do you have a local file/module named "select.py" that is shadowing the "select" module from the standard library? |
Hi, no i don't, my working script is in the same folder as the locustfile.py, and just for info, just adding a locust import (for example: from locust import TaskSet) at the top of my non-locust script make it crash. I did go around my problem by using my script as a standalone, with a pair of sockets between it and locust to communicate. Thanks, |
I believe this might be due to gevent monkey patching select. Just running the following also fails: from gevent import monkey
monkey.patch_all()
import select
select.epoll Locust runs gevent's monkey.patch_all() at the start. |
Ok, i will continue with my separate process then. |
Hi all,
I'm trying to test the websocket mechanism of our server.
I have a python script, in stand alone, it establishes websockets connections, then a thread poll the websocket files descriptors to know when to receive.
when i try to integrate this script with locust, at runtime i get the following error :
phoenix/ERROR/stderr: Traceback (most recent call last):
phoenix/ERROR/stderr: File "/usr/local/bin/locust", line 9, in
phoenix/ERROR/stderr:
phoenix/ERROR/stderr: load_entry_point('locustio==0.7.2', 'console_scripts', 'locust')()
phoenix/ERROR/stderr: File "/usr/local/lib/python2.7/dist-packages/locustio-0.7.2-py2.7.egg/locust/main.py", line 349, in main
phoenix/ERROR/stderr:
phoenix/ERROR/stderr: docstring, locusts = load_locustfile(locustfile)
phoenix/ERROR/stderr: File "/usr/local/lib/python2.7/dist-packages/locustio-0.7.2-py2.7.egg/locust/main.py", line 321, in load_locustfile
phoenix/ERROR/stderr:
phoenix/ERROR/stderr: imported = import(os.path.splitext(locustfile)[0])
phoenix/ERROR/stderr: File "/home/cedricl/AVIRER/locustfile.py", line 28, in
phoenix/ERROR/stderr:
phoenix/ERROR/stderr: wsPoll = select.epoll()
phoenix/ERROR/stderr: AttributeError
phoenix/ERROR/stderr: :
phoenix/ERROR/stderr: 'module' object has no attribute 'epoll'
on a working script, if i just add a locust import, (for example: from locust import TaskSet)
it produce the trace.
on a working locust script (one of the example), adding the following 2 lines :
import select
wsPoll = select.epoll()
produce the problem.
Does anyone know how to use epoll or poll with locust ?
Thanks,
Cedric.
The text was updated successfully, but these errors were encountered: