TypeError: urlopen() got multiple values for keyword argument 'body' while trying Selenium on Xubuntu 14.04.5 TypeError: urlopen() got multiple values for keyword argument 'body' while trying Selenium on Xubuntu 14.04.5 selenium selenium

TypeError: urlopen() got multiple values for keyword argument 'body' while trying Selenium on Xubuntu 14.04.5


Took some risk and removed urllib 1.7.1 (default one that ships within Ubuntu 14.04). It may depend on your requirements if you want to take risk and uninstall it.

sudo apt-get remove python-urllib3

followed by

sudo pip install -U urllib3

This fixed the issue for me.


Potential solutions:

1- Try upgrading the version o urllib3, seems like the version of urllib3 is old according to: https://github.com/kubernetes-client/python/blob/master/requirements.txt

Make sure the version of urllib3 is 1.16 or more. Here, you can find the setup:https://launchpad.net/ubuntu/+source/python-urllib3/1.21.1-1

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

2- Update the version of python:

sudo add-apt-repository ppa:jonathonf/python-3.6sudo apt-get update sudo apt-get install python3.6sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2sudo update-alternatives --config python3

Ref: http://ubuntuhandbook.org/index.php/2017/07/install-python-3-6-1-in-ubuntu-16-04-lts/