0

当我运行代码bzt test.yml时出现错误。在它工作正常之前。

C:\etc\tmp\my-test>more test.yml
---
execution:
   concurrency: 50
   hold-for: 2m30s
   ramp-up: 1m
   scenario:
      requests:
         - url: http://server12:12012/

    C:\etc\tmp\my-test>bzt test.yml
        Traceback (most recent call last):
          File "C:\Python27\Scripts\bzt-script.py", line 9, in <module>
            load_entry_point('bzt==1.6.7', 'console_scripts', 'bzt')()
          File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 564, in load_entry_point
            return get_distribution(dist).load_entry_point(group, name)
          File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2621, in load_entry_point
            return ep.load()
          File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2281, in load
            return self.resolve()
          File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2287, in resolve
            module = __import__(self.module_name, fromlist=['__name__'], level=0)
          File "c:\python27\lib\site-packages\bzt\cli.py", line 32, in <module>
            from bzt.engine import Engine, Configuration, ScenarioExecutor
          File "c:\python27\lib\site-packages\bzt\engine.py", line 37, in <module>
            from bzt.six import build_opener, install_opener, urlopen, request, numeric_types, iteritems
          File "c:\python27\lib\site-packages\bzt\six\__init__.py", line 35, in <module>
            import elementtree.ElementTree as etree
        ImportError: No module named elementtree.ElementTree
4

2 回答 2

0

对我来说,这听起来像是丢失或损坏的lxml包。

解决方法在:

  1. 试用Taurus 安装程序
  2. 通过 pip重新安装lxml和/或软件包。bzt

查看:

如果问题仍然存在,请使用bzt.log文件内容更新您的问题。

于 2016-08-30T17:07:18.677 回答
0
ImportError: No module named elementtree.ElementTree

你确定它不应该是

import xml.etree.ElementTree as etree

否则,请检查您是否安装了此依赖项,或者您当前项目中是否有与导入查找相关的“elementtree”文件夹

于 2016-08-30T07:02:46.000 回答