2015-03-19 21 views
0

操作系統:的CentOS 7.0 64
解釋器:的Python 3.4.1從源代碼編譯與--enable-shared默認安裝Python蝗蟲拋出異常

實施例的命令:

$ python3.4 -c "import locust" 

回溯:

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 

我很困惑...爲什麼它在異常字符串中的「屬性」一詞上調用SyntaxError

我真的不知道該在這裏嘗試甚麼。我做了一個strace,結果基本上是100%,所以沒有額外的線索。

回答