3

This is annoying, So I spent the past 15 hours trying to figure out why locust.io will not launch for me. On my mac machine, I am trying to get an example of locust running so I can begin my exploration of the package. I installed locust in my virtual env(python v3.7.7) using pip: pip install locust

All packages installed successfully.

here is the sample code:

from locust import HttpLocust,TaskSet

class MyTasks(TaskSet):
def index(self):
self.client.get("https://refinery.nypl.org/api/nypl/ndo/v0.1/content/alerts?filter[scope]=all")

class WebsiteUser(HttpLocust):
task_set = MyTasks

I ran locust -f mytestloc.py upon doing so i get this error:

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject

return f(*args, **kwds)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject

return f(*args, **kwds)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject

return f(*args, **kwds)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject

return f(*args, **kwds)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject

return f(*args, **kwds)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject

return f(*args, **kwds)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject

return f(*args, **kwds)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject

return f(*args, **kwds)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject

return f(*args, **kwds)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject

return f(*args, **kwds)
AndrewRoj
  • 97
  • 1
  • 8
  • Have you tried running the basic example? That should help narrow down the problem. https://github.com/locustio/locust/blob/master/examples/basic.py At first glance, it looks strange that you're using `HttpLocust`. Maybe try `HttpUser` instead. Not sure why that would cause your problems, though. – Solowalker Oct 14 '20 at 22:53
  • Hey @Solowalker yup I tried the basic example as well as adding HttpUser and its the same error message. – AndrewRoj Oct 14 '20 at 23:08

2 Answers2

6

Greenlet runtime error and deployed app in docker keeps booting all the workers

Try pip install --upgrade gevent or pip install greenlet==0.14.6.

Solowalker
  • 2,431
  • 8
  • 13
  • 1
    I have bumped locust's dependency on gevent to require 20.9.0+ (latest) so this shouldnt be an issue in the future (already now it should only ever happen if you for some reason had the latest greenlet but NOT the latest gevent) – Cyberwiz Oct 15 '20 at 16:40
  • this version doesn't exist anymore. did you mean to type 0.4.16? – Ugur Yilmaz Apr 04 '23 at 20:28
  • Yes, that version was intentional. This was an issue at the time and the answer addressed the specific issue. It's been helpful for lots of people, as you can tell from the upvotes and the view count. I doubt this would be too directly helpful at the moment, but perhaps it might indirectly help or inspire someone with similar issues to seek similar answers. – Solowalker Apr 04 '23 at 23:07
0

try pip install greenlet==0.4.16

  • Welcome to Stack Overflow. Thanks for your contribution. But could you please add an explanation even if it is only a brief one. [How to Answer](https://stackoverflow.com/help/how-to-answer). Kind Regards. – Elletlar Nov 26 '20 at 09:28