TypeError: urlopen() got multiple values for keyword argument 'body' while executing tests through Selenium and Python on Kubuntu 14.04

[亡魂溺海] 提交于 2019-11-29 13:45:45
Moamen Abdelwahed

You can update your urllib3 using

pip install --upgrade --ignore-installed urllib3

This error message...

TypeError: urlopen() got multiple values for keyword argument 'body'

...implies that the Python Client faced an error while invoking urlopen() internally.

This error is usually caused by an older version of pip that is installed by your systems package manager and can be replaced with a newer version of pip.


Solution

Upgrading pip to the latest version (atleast v18.0) will solve your problem.

C:\Users\myUser>python -m pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
    100% |¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦| 1.3MB 544kB/s
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
      Successfully uninstalled pip-10.0.1
Successfully installed pip-18.0

References

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!