Vasili Syrakis
Vasili Syrakis

Reputation: 9591

Default install of Python Locust throws exception

Operating System: CentOS 7.0 x64
Interpreter: Python 3.4.1 compiled from source with --enable-shared

Example command:

$ python3.4 -c "import locust"

Traceback:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.4/site-packages/locust/__init__.py", line 1, in <module>
  from core import HttpLocust, Locust, TaskSet, task
File "/usr/local/lib/python3.4/site-packages/locust/core.py", line 106
  raise LocustError, LocustError("A task inside a Locust class' main TaskSet 
  (`%s.task_set` of type `%s`) seems to have called interrupt() or raised 
  an InterruptTaskSet exception. The interrupt() function is used to hand over execution
  to a parent TaskSet, and should never be called in the main TaskSet which a Locust
  class' task_set attribute points to." % (type(self).__name__, self.task_set.__name__)), sys.exc_info()[2]
                  ^
SyntaxError: invalid syntax

I'm confused... Why is it calling a SyntaxError on the word "attribute" inside the exception string?

I am really not sure what to even try here. I did a strace and the result is basically 100% the same, so no extra clues there.

Upvotes: 0

Views: 1298

Answers (1)

kunl
kunl

Reputation: 1195

Well, according to the official locust docs (http://docs.locust.io/en/latest/installation.html#supported-python-versions), it isn't compitable with Python 3.x right now.

Supported Python Versions
Locust requires Python 2.6+. It is not currently compatible with Python 3.x.

Maybe that is the issue?

Upvotes: 1

Related Questions