Skip to content
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

loop() got unexpected keyword argument #485

Closed
skunert opened this issue Oct 5, 2016 · 3 comments
Closed

loop() got unexpected keyword argument #485

skunert opened this issue Oct 5, 2016 · 3 comments

Comments

@skunert
Copy link

skunert commented Oct 5, 2016

Hi everyone,

I tried to install locust 0.7.5 on Windows 7. I followed the instructions from the docs. They state to first install a binary of gevent 0.13 for Windows. Afterwards I executed pip install locustio. This, however installed a version of gevent 1.1.1 on my system.

After installation and trying to execute a simple locust program, I get the following error:

Traceback (most recent call last):
File "C:\Python27\Scripts\locust-script.py", line 9, in <module>
   load_entry_point('locustio==0.7.5', 'console_scripts', 'locust')()
File "C:\Python27\lib\site-packages\locustio-0.7.5-py2.7.egg\locust\main.py", line 398, in main
   main_greenlet = gevent.spawn(web.start, locust_classes, options)
File "C:\Python27\lib\site-packages\gevent\greenlet.py", line 373, in spawn
   g = cls(*args, **kwargs)
File "C:\Python27\lib\site-packages\gevent\greenlet.py", line 143, in __init__
   greenlet.__init__(self, None, get_hub())
File "C:\Python27\lib\site-packages\gevent\hub.py", line 387, in get_hub
   hub = _threadlocal.hub = hubtype(*args, **kwargs)
File "C:\Python27\lib\site-packages\gevent\hub.py", line 523, in __init__
   self.loop = loop_class(flags=loop, default=default)
File "core.pyx", line 402, in gevent.core.loop (gevent/core.c:6195)
TypeError
loop() got an unexpected keyword argument 'default'

Is this a bug? Did I fail during installation?

Thanks!

@heyman
Copy link
Member

heyman commented Oct 5, 2016

Locust now uses gevent 1.1.1 (I just updated the docs, thanks for pointing it out).

Unfortunately I'm not able to reproduce the error on OSX.

What do you see if you open up a python console and run the following?

import gevent
print gevent.__version__

@skunert
Copy link
Author

skunert commented Oct 5, 2016

Hi,

I was able to resolve the problem by uninstalling locustio and gevent via pip. I assume that the previously installed wrong version of gevent was the culprit. Why does the doc even state that you have to install a binary beforehand on windows? Just running pip install locustio without previous steps worked best for me, gevent 1.1.1 was automatically installed and everything works now. Nevertheless, thanks for your fast response :).

@heyman
Copy link
Member

heyman commented Oct 5, 2016

I'm happy you were able to resolve it.

A couple of years ago, it was pretty common for developers on windows to not have a working python build environment set up, which would result in errors when trying to install python packages that had C extensions that needed to be built. However, maybe this has changed now when there are wheels in PyPI/PIP? In that case it would make sense to update the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants