我正在尝试在docker镜像上启动机器人代码。所以我已经安装了python 3和我需要的所有库(我希望)。
这里是一个概述:

$ pip list
Package                        Version
------------------------------ -------
asn1crypto                     0.24.0
bcrypt                         3.1.7
cffi                           1.12.3
configparser                   3.5.0b2
cryptography                   2.7
cx-Oracle                      7.2.3
entrypoints                    0.3
enum34                         1.1.6
ipaddress                      1.0.17
keyring                        17.1.1
keyrings.alt                   3.1.1
mercurial                      4.8.2
paramiko                       2.6.0
pip                            18.1
pycparser                      2.19
pycrypto                       2.6.1
PyGObject                      3.30.4
PyNaCl                         1.3.0
pyxdg                          0.25
robotframework                 3.1.2
robotframework-databaselibrary 1.2.4
robotframework-datadriver      0.0.3
robotframework-sshlibrary      3.3.0
scp                            0.13.2
SecretStorage                  2.3.1
setuptools                     3.4
six                            1.12.0
wheel                          0.32.3

但是,当我尝试启动机器人代码时,它在代码中进行的第一个调用是指向DataDriver库,但似乎失败了。
据我所知,该错误将表示它未正确安装,但在上面提到的列表中。
我收到的错误:
$ robot --outputdir output IPS/BCMC.robot
==============================================================================
BCMC
==============================================================================
[ ERROR ] Calling method '_start_suite' of listener 'DataDriver' failed: TypeError: 'encoding' is an invalid keyword argument for this function
Dummy test Case                                                       | FAIL |
Test case contains no keywords.
------------------------------------------------------------------------------
BCMC                                                                  | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /builds/tcc--test-automation/back-office-bcmc/int2peach-bcmc/output/output.xml
Log:     /builds/tcc--test-automation/back-office-bcmc/int2peach-bcmc/output/log.html
Report:  /builds/tcc--test-automation/back-office-bcmc/int2peach-bcmc/output/report.html
ERROR: Job failed: exit code 1

有什么建议么?

编辑:
这是Docker镜像上DataDriver模块安装的跟踪:
$ pip install robotframework-datadriver==0.0.3
Collecting robotframework-datadriver==0.0.3
  Downloading https://files.pythonhosted.org/packages/5d/d2/d980c9fecca7bc595c1c86a9f8eaf67cc4c740b41317431c43cef2125c80/robotframework-datadriver-0.0.3.tar.gz (64kB)
Building wheels for collected packages: robotframework-datadriver
  Running setup.py bdist_wheel for robotframework-datadriver: started
  Running setup.py bdist_wheel for robotframework-datadriver: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/01/47/fe/ecf3f26ea74c3fd7a1089b0eb6ec41d232f36e17b315b3d7da
Successfully built robotframework-datadriver
Installing collected packages: robotframework-datadriver
Successfully installed robotframework-datadriver-0.0.3

最佳答案

尝试将我个人电脑上的库版本与镜像上安装的版本匹配时出错。应该做的。
在我的pip安装中删除版本规范可解决此问题。

08-07 13:43