首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TypeError:在使用金牛座运行分布式蝗虫时必须是字符串,而不是NoneType

TypeError:在使用金牛座运行分布式蝗虫时必须是字符串,而不是NoneType
EN

Stack Overflow用户
提问于 2018-06-20 13:44:58
回答 1查看 360关注 0票数 0

我正在尝试为分布式蝗虫运行创建一个配置,我有一个定义了任务的.py脚本,我有一个简单的金牛座配置只是为了让它工作:

代码语言:javascript
复制
execution:
  executor: locust
  master: true
  slaves: 1
  scenario: tns
  concurrency: 10
  ramp-up: 10s
  iterations: 100
  hold-for: 10s

scenarios:
  tns:
    script: /usr/src/app/scenarios/locust_scenarios/sample.py

reporting:
- module: final-stats
  dump-csv: test_result.csv
- module: console
- module: passfail
  criteria:
   - avg-rt>250ms for 30s, continue as failed
   - failures>5% for 5s, continue as failed
   - failures>50% for 10s, stop as failed

然后我启动蝗虫从节点:

代码语言:javascript
复制
python -m locust.main -f scenarios/locust_scenarios/sample.py --slave --master-host=localhost

并执行测试,这是日志

代码语言:javascript
复制
$ bzt -o modules.console.screen=gui locust_tests_execution_config.yaml
12:38:54 INFO: Taurus CLI Tool v1.12.0
12:38:54 INFO: Starting with configs: ['locust_tests_execution_config.yaml']
12:38:54 INFO: Configuring...
12:38:54 INFO: Artifacts dir: /Users/usr/Projects/load/2018-06-20_12-38-54.391229
12:38:54 WARNING: at path 'execution': 'execution' should be a list
12:38:54 INFO: Preparing...
12:38:54 WARNING: Module 'console' can be only used once, will merge all new instances into single
12:38:54 INFO: Starting...
12:38:54 INFO: Waiting for results...
12:38:55 WARNING: Please wait for graceful shutdown...
12:38:55 INFO: Shutting down...
12:38:56 INFO: Terminating process PID 54419 with signal Signals.SIGTERM (59 tries left)
12:38:57 INFO: Terminating process PID 54419 with signal Signals.SIGTERM (58 tries left)
12:38:57 ERROR: TypeError: must be str, not NoneType
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/cli.py", line 250, in perform
    self.engine.run()
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/engine.py", line 222, in run
    reraise(exc_info)
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/six/py3.py", line 84, in reraise
    raise exc
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/engine.py", line 204, in run
    self._wait()
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/engine.py", line 243, in _wait
    while not self._check_modules_list():
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/engine.py", line 230, in _check_modules_list
    finished = bool(module.check())
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/modules/aggregator.py", line 635, in check
    for point in self.datapoints():
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/modules/aggregator.py", line 401, in datapoints
    for datapoint in self._calculate_datapoints(final_pass):
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/modules/aggregator.py", line 664, in _calculate_datapoints
    self._process_underlings(final_pass)
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/modules/aggregator.py", line 649, in _process_underlings
    for data in underling.datapoints(final_pass):
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/modules/aggregator.py", line 401, in datapoints
    for datapoint in self._calculate_datapoints(final_pass):
  File "/Users/usr/.virtualenvs/stfw/lib/python3.6/site-packages/bzt/modules/locustio.py", line 221, in _calculate_datapoints
    self.read_buffer += self.file.get_bytes(size=1024 * 1024, last_pass=final_pass)
12:38:57 INFO: Post-processing...
12:38:57 INFO: Test duration: 0:00:03
12:38:57 INFO: Test duration: 0:00:03
12:38:57 INFO: Artifacts dir: /Users/usr/Projects/load/2018-06-20_12-38-54.391229
12:38:57 WARNING: Done performing with code: 1

蝗虫日志显示蝗虫从站已连接并准备群集。

我应该怎么做才能让它运行?谢谢

EN

回答 1

Stack Overflow用户

发布于 2018-06-21 12:26:01

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50941040

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档