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









up vote
2
down vote

favorite












Environment



# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty


GCC



gcc --version
gcc (Ubuntu 4.8.5-4ubuntu8~14.04.2) 4.8.5


Python



python --version
Python 2.7.6


Pip



pip --version
pip 18.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)


urllib3



pip list | grep url
urllib3 1.7.1


Chromedriver



chromedriver --version
ChromeDriver 2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4)


Chromium



chromium-browser --version
Chromium 65.0.3325.181 Built on Ubuntu , running on Ubuntu 14.04


Selenium



pip install selenium
Requirement already satisfied: selenium in /usr/local/lib/python2.7/dist-packages (3.141.0)
Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages (from selenium) (1.7.1)


Chrome driver for linux 64bit install



I tried several version, but all lead to the same new problem



rm ~/Downloads/chromedriver_linux64.zip 
wget -N http://chromedriver.storage.googleapis.com/2.26/chromedriver_linux64.zip -P ~/Downloads;
unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads;
chmod +x ~/Downloads/chromedriver;
rm /usr/local/share/chromedriver;
sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver;
rm /usr/local/bin/chromedriver;
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver;
rm /usr/bin/chromedriver;
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver;
ls -al /usr/bin/chromedriver;
ls -al /usr/local/bin/chromedriver;
ls -al /usr/local/share/chromedriver


... tried



# wget -N http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.43/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/71.0.3578.33/chromedriver_linux64.zip -P ~/Downloads


Test script test.py



from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
# enable browser logging
d = DesiredCapabilities.CHROME
d['loggingPrefs'] = 'browser':'ALL'
driver = webdriver.Chrome(desired_capabilities=d)
# load some site
driver.get('http://foo.com')
# print messages
for entry in driver.get_log('browser'):
print entry


Error



python test.py 
Traceback (most recent call last):
File "test.py", line 6, in <module>
driver = webdriver.Chrome(desired_capabilities=d)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 319, in execute
response = self.command_executor.execute(driver_command, params)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 374, in execute
return self._request(command_info[0], url, body=data)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 397, in _request
resp = self._conn.request(method, url, body=body, headers=headers)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 79, in request
**urlopen_kw)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 142, in request_encode_body
**urlopen_kw)
TypeError: urlopen() got multiple values for keyword argument 'body'


Followed other threads



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



urllib3 version



# aptitude show python-urllib3
Package: python-urllib3
State: installed
Automatically installed: yes
Version: 1.7.1-1ubuntu4.1
Priority: optional
Section: python
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Uncompressed Size: 201 k
Depends: python:any (< 2.8), python:any (>= 2.7.5-5~), python-six
Recommends: ca-certificates
Description: HTTP library with thread-safe connection pooling for Python
urllib3 supports features left out of urllib and urllib2 libraries.

* Re-use the same socket connection for multiple requests (HTTPConnectionPool and HTTPSConnectionPool) (with optional client-side certificate verification).
* File posting (encode_multipart_formdata).
* Built-in redirection and retries (optional).
* Supports gzip and deflate decoding.
* Thread-safe and sanity-safe.
* Small and easy to understand codebase perfect for extending and building upon.
Homepage: http://urllib3.readthedocs.org


I have another setup with same chromium-browser chromedriver versions and the error doesn't happen. What else could I check?



Any further pointers?



UPDATE



On the environment where the issue doesn't happen the pip version isn't the same.



pip v1.5.4 instead pip install --upgrade pip==1.5.4
Now uninstalling pip 18.1 and reinstalling my pip packages.



To install back the latest version of pip if you want to revert again



python -m pip install --upgrade pip


Also noted that on the functioning machine I have a slightly different version of GCC



gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4


Resolved



I had to start from a fresh Xubuntu setup and ran



sudo pip install -U urllib3









share|improve this question























  • Got exact same issue on same versions.
    – Sanket Parlikar
    Nov 8 at 0:23










  • upvote the question, see if someone can help. thx
    – zabumba
    Nov 8 at 0:40














up vote
2
down vote

favorite












Environment



# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty


GCC



gcc --version
gcc (Ubuntu 4.8.5-4ubuntu8~14.04.2) 4.8.5


Python



python --version
Python 2.7.6


Pip



pip --version
pip 18.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)


urllib3



pip list | grep url
urllib3 1.7.1


Chromedriver



chromedriver --version
ChromeDriver 2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4)


Chromium



chromium-browser --version
Chromium 65.0.3325.181 Built on Ubuntu , running on Ubuntu 14.04


Selenium



pip install selenium
Requirement already satisfied: selenium in /usr/local/lib/python2.7/dist-packages (3.141.0)
Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages (from selenium) (1.7.1)


Chrome driver for linux 64bit install



I tried several version, but all lead to the same new problem



rm ~/Downloads/chromedriver_linux64.zip 
wget -N http://chromedriver.storage.googleapis.com/2.26/chromedriver_linux64.zip -P ~/Downloads;
unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads;
chmod +x ~/Downloads/chromedriver;
rm /usr/local/share/chromedriver;
sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver;
rm /usr/local/bin/chromedriver;
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver;
rm /usr/bin/chromedriver;
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver;
ls -al /usr/bin/chromedriver;
ls -al /usr/local/bin/chromedriver;
ls -al /usr/local/share/chromedriver


... tried



# wget -N http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.43/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/71.0.3578.33/chromedriver_linux64.zip -P ~/Downloads


Test script test.py



from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
# enable browser logging
d = DesiredCapabilities.CHROME
d['loggingPrefs'] = 'browser':'ALL'
driver = webdriver.Chrome(desired_capabilities=d)
# load some site
driver.get('http://foo.com')
# print messages
for entry in driver.get_log('browser'):
print entry


Error



python test.py 
Traceback (most recent call last):
File "test.py", line 6, in <module>
driver = webdriver.Chrome(desired_capabilities=d)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 319, in execute
response = self.command_executor.execute(driver_command, params)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 374, in execute
return self._request(command_info[0], url, body=data)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 397, in _request
resp = self._conn.request(method, url, body=body, headers=headers)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 79, in request
**urlopen_kw)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 142, in request_encode_body
**urlopen_kw)
TypeError: urlopen() got multiple values for keyword argument 'body'


Followed other threads



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



urllib3 version



# aptitude show python-urllib3
Package: python-urllib3
State: installed
Automatically installed: yes
Version: 1.7.1-1ubuntu4.1
Priority: optional
Section: python
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Uncompressed Size: 201 k
Depends: python:any (< 2.8), python:any (>= 2.7.5-5~), python-six
Recommends: ca-certificates
Description: HTTP library with thread-safe connection pooling for Python
urllib3 supports features left out of urllib and urllib2 libraries.

* Re-use the same socket connection for multiple requests (HTTPConnectionPool and HTTPSConnectionPool) (with optional client-side certificate verification).
* File posting (encode_multipart_formdata).
* Built-in redirection and retries (optional).
* Supports gzip and deflate decoding.
* Thread-safe and sanity-safe.
* Small and easy to understand codebase perfect for extending and building upon.
Homepage: http://urllib3.readthedocs.org


I have another setup with same chromium-browser chromedriver versions and the error doesn't happen. What else could I check?



Any further pointers?



UPDATE



On the environment where the issue doesn't happen the pip version isn't the same.



pip v1.5.4 instead pip install --upgrade pip==1.5.4
Now uninstalling pip 18.1 and reinstalling my pip packages.



To install back the latest version of pip if you want to revert again



python -m pip install --upgrade pip


Also noted that on the functioning machine I have a slightly different version of GCC



gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4


Resolved



I had to start from a fresh Xubuntu setup and ran



sudo pip install -U urllib3









share|improve this question























  • Got exact same issue on same versions.
    – Sanket Parlikar
    Nov 8 at 0:23










  • upvote the question, see if someone can help. thx
    – zabumba
    Nov 8 at 0:40












up vote
2
down vote

favorite









up vote
2
down vote

favorite











Environment



# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty


GCC



gcc --version
gcc (Ubuntu 4.8.5-4ubuntu8~14.04.2) 4.8.5


Python



python --version
Python 2.7.6


Pip



pip --version
pip 18.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)


urllib3



pip list | grep url
urllib3 1.7.1


Chromedriver



chromedriver --version
ChromeDriver 2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4)


Chromium



chromium-browser --version
Chromium 65.0.3325.181 Built on Ubuntu , running on Ubuntu 14.04


Selenium



pip install selenium
Requirement already satisfied: selenium in /usr/local/lib/python2.7/dist-packages (3.141.0)
Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages (from selenium) (1.7.1)


Chrome driver for linux 64bit install



I tried several version, but all lead to the same new problem



rm ~/Downloads/chromedriver_linux64.zip 
wget -N http://chromedriver.storage.googleapis.com/2.26/chromedriver_linux64.zip -P ~/Downloads;
unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads;
chmod +x ~/Downloads/chromedriver;
rm /usr/local/share/chromedriver;
sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver;
rm /usr/local/bin/chromedriver;
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver;
rm /usr/bin/chromedriver;
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver;
ls -al /usr/bin/chromedriver;
ls -al /usr/local/bin/chromedriver;
ls -al /usr/local/share/chromedriver


... tried



# wget -N http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.43/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/71.0.3578.33/chromedriver_linux64.zip -P ~/Downloads


Test script test.py



from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
# enable browser logging
d = DesiredCapabilities.CHROME
d['loggingPrefs'] = 'browser':'ALL'
driver = webdriver.Chrome(desired_capabilities=d)
# load some site
driver.get('http://foo.com')
# print messages
for entry in driver.get_log('browser'):
print entry


Error



python test.py 
Traceback (most recent call last):
File "test.py", line 6, in <module>
driver = webdriver.Chrome(desired_capabilities=d)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 319, in execute
response = self.command_executor.execute(driver_command, params)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 374, in execute
return self._request(command_info[0], url, body=data)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 397, in _request
resp = self._conn.request(method, url, body=body, headers=headers)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 79, in request
**urlopen_kw)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 142, in request_encode_body
**urlopen_kw)
TypeError: urlopen() got multiple values for keyword argument 'body'


Followed other threads



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



urllib3 version



# aptitude show python-urllib3
Package: python-urllib3
State: installed
Automatically installed: yes
Version: 1.7.1-1ubuntu4.1
Priority: optional
Section: python
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Uncompressed Size: 201 k
Depends: python:any (< 2.8), python:any (>= 2.7.5-5~), python-six
Recommends: ca-certificates
Description: HTTP library with thread-safe connection pooling for Python
urllib3 supports features left out of urllib and urllib2 libraries.

* Re-use the same socket connection for multiple requests (HTTPConnectionPool and HTTPSConnectionPool) (with optional client-side certificate verification).
* File posting (encode_multipart_formdata).
* Built-in redirection and retries (optional).
* Supports gzip and deflate decoding.
* Thread-safe and sanity-safe.
* Small and easy to understand codebase perfect for extending and building upon.
Homepage: http://urllib3.readthedocs.org


I have another setup with same chromium-browser chromedriver versions and the error doesn't happen. What else could I check?



Any further pointers?



UPDATE



On the environment where the issue doesn't happen the pip version isn't the same.



pip v1.5.4 instead pip install --upgrade pip==1.5.4
Now uninstalling pip 18.1 and reinstalling my pip packages.



To install back the latest version of pip if you want to revert again



python -m pip install --upgrade pip


Also noted that on the functioning machine I have a slightly different version of GCC



gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4


Resolved



I had to start from a fresh Xubuntu setup and ran



sudo pip install -U urllib3









share|improve this question















Environment



# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty


GCC



gcc --version
gcc (Ubuntu 4.8.5-4ubuntu8~14.04.2) 4.8.5


Python



python --version
Python 2.7.6


Pip



pip --version
pip 18.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)


urllib3



pip list | grep url
urllib3 1.7.1


Chromedriver



chromedriver --version
ChromeDriver 2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4)


Chromium



chromium-browser --version
Chromium 65.0.3325.181 Built on Ubuntu , running on Ubuntu 14.04


Selenium



pip install selenium
Requirement already satisfied: selenium in /usr/local/lib/python2.7/dist-packages (3.141.0)
Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages (from selenium) (1.7.1)


Chrome driver for linux 64bit install



I tried several version, but all lead to the same new problem



rm ~/Downloads/chromedriver_linux64.zip 
wget -N http://chromedriver.storage.googleapis.com/2.26/chromedriver_linux64.zip -P ~/Downloads;
unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads;
chmod +x ~/Downloads/chromedriver;
rm /usr/local/share/chromedriver;
sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver;
rm /usr/local/bin/chromedriver;
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver;
rm /usr/bin/chromedriver;
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver;
ls -al /usr/bin/chromedriver;
ls -al /usr/local/bin/chromedriver;
ls -al /usr/local/share/chromedriver


... tried



# wget -N http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/2.43/chromedriver_linux64.zip -P ~/Downloads
# wget -N http://chromedriver.storage.googleapis.com/71.0.3578.33/chromedriver_linux64.zip -P ~/Downloads


Test script test.py



from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
# enable browser logging
d = DesiredCapabilities.CHROME
d['loggingPrefs'] = 'browser':'ALL'
driver = webdriver.Chrome(desired_capabilities=d)
# load some site
driver.get('http://foo.com')
# print messages
for entry in driver.get_log('browser'):
print entry


Error



python test.py 
Traceback (most recent call last):
File "test.py", line 6, in <module>
driver = webdriver.Chrome(desired_capabilities=d)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 319, in execute
response = self.command_executor.execute(driver_command, params)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 374, in execute
return self._request(command_info[0], url, body=data)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 397, in _request
resp = self._conn.request(method, url, body=body, headers=headers)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 79, in request
**urlopen_kw)
File "/usr/lib/python2.7/dist-packages/urllib3/request.py", line 142, in request_encode_body
**urlopen_kw)
TypeError: urlopen() got multiple values for keyword argument 'body'


Followed other threads



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



urllib3 version



# aptitude show python-urllib3
Package: python-urllib3
State: installed
Automatically installed: yes
Version: 1.7.1-1ubuntu4.1
Priority: optional
Section: python
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Uncompressed Size: 201 k
Depends: python:any (< 2.8), python:any (>= 2.7.5-5~), python-six
Recommends: ca-certificates
Description: HTTP library with thread-safe connection pooling for Python
urllib3 supports features left out of urllib and urllib2 libraries.

* Re-use the same socket connection for multiple requests (HTTPConnectionPool and HTTPSConnectionPool) (with optional client-side certificate verification).
* File posting (encode_multipart_formdata).
* Built-in redirection and retries (optional).
* Supports gzip and deflate decoding.
* Thread-safe and sanity-safe.
* Small and easy to understand codebase perfect for extending and building upon.
Homepage: http://urllib3.readthedocs.org


I have another setup with same chromium-browser chromedriver versions and the error doesn't happen. What else could I check?



Any further pointers?



UPDATE



On the environment where the issue doesn't happen the pip version isn't the same.



pip v1.5.4 instead pip install --upgrade pip==1.5.4
Now uninstalling pip 18.1 and reinstalling my pip packages.



To install back the latest version of pip if you want to revert again



python -m pip install --upgrade pip


Also noted that on the functioning machine I have a slightly different version of GCC



gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4


Resolved



I had to start from a fresh Xubuntu setup and ran



sudo pip install -U urllib3






python-2.7 selenium ubuntu ubuntu-14.04 urllib3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 23:20

























asked Nov 7 at 23:48









zabumba

7,86263894




7,86263894











  • Got exact same issue on same versions.
    – Sanket Parlikar
    Nov 8 at 0:23










  • upvote the question, see if someone can help. thx
    – zabumba
    Nov 8 at 0:40
















  • Got exact same issue on same versions.
    – Sanket Parlikar
    Nov 8 at 0:23










  • upvote the question, see if someone can help. thx
    – zabumba
    Nov 8 at 0:40















Got exact same issue on same versions.
– Sanket Parlikar
Nov 8 at 0:23




Got exact same issue on same versions.
– Sanket Parlikar
Nov 8 at 0:23












upvote the question, see if someone can help. thx
– zabumba
Nov 8 at 0:40




upvote the question, see if someone can help. thx
– zabumba
Nov 8 at 0:40












2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted
+100










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.6
sudo apt-get update
sudo apt-get install python3.6
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --config python3


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






share|improve this answer




















  • Thank you for your contribution! I have a strong dependency on the version of Python 2.7.6, and I need to stay on Ubuntu 14.04.5 :( pip install urllib3 I get Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages. It won't install a newer version.
    – zabumba
    Nov 11 at 0:24










  • Try a different way to upgrade your urllib3 version maybe? u can download the tar.gz from the link in my answer and install manually?
    – Eray Balkanli
    Nov 11 at 0:27






  • 1




    not 100% sure but reinstalling "requests" might help the Request already satisfied issue as well, via "pip uninstall requests", then "pip install requests". I believe there is a very big chance this issue is related to the version of urllib3 that have been installed
    – Eray Balkanli
    Nov 11 at 0:32











  • Apparently can't uninstalled requests (owned by OS).
    – zabumba
    Nov 11 at 22:49






  • 1




    why u couldn't uninstall it, any error message??
    – Eray Balkanli
    Nov 11 at 22:56

















up vote
1
down vote













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.






share|improve this answer






















  • :( that didn't work for me, but thanks anyway
    – zabumba
    Nov 8 at 22:14










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53199623%2ftypeerror-urlopen-got-multiple-values-for-keyword-argument-body-while-tryin%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted
+100










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.6
sudo apt-get update
sudo apt-get install python3.6
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --config python3


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






share|improve this answer




















  • Thank you for your contribution! I have a strong dependency on the version of Python 2.7.6, and I need to stay on Ubuntu 14.04.5 :( pip install urllib3 I get Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages. It won't install a newer version.
    – zabumba
    Nov 11 at 0:24










  • Try a different way to upgrade your urllib3 version maybe? u can download the tar.gz from the link in my answer and install manually?
    – Eray Balkanli
    Nov 11 at 0:27






  • 1




    not 100% sure but reinstalling "requests" might help the Request already satisfied issue as well, via "pip uninstall requests", then "pip install requests". I believe there is a very big chance this issue is related to the version of urllib3 that have been installed
    – Eray Balkanli
    Nov 11 at 0:32











  • Apparently can't uninstalled requests (owned by OS).
    – zabumba
    Nov 11 at 22:49






  • 1




    why u couldn't uninstall it, any error message??
    – Eray Balkanli
    Nov 11 at 22:56














up vote
1
down vote



accepted
+100










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.6
sudo apt-get update
sudo apt-get install python3.6
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --config python3


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






share|improve this answer




















  • Thank you for your contribution! I have a strong dependency on the version of Python 2.7.6, and I need to stay on Ubuntu 14.04.5 :( pip install urllib3 I get Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages. It won't install a newer version.
    – zabumba
    Nov 11 at 0:24










  • Try a different way to upgrade your urllib3 version maybe? u can download the tar.gz from the link in my answer and install manually?
    – Eray Balkanli
    Nov 11 at 0:27






  • 1




    not 100% sure but reinstalling "requests" might help the Request already satisfied issue as well, via "pip uninstall requests", then "pip install requests". I believe there is a very big chance this issue is related to the version of urllib3 that have been installed
    – Eray Balkanli
    Nov 11 at 0:32











  • Apparently can't uninstalled requests (owned by OS).
    – zabumba
    Nov 11 at 22:49






  • 1




    why u couldn't uninstall it, any error message??
    – Eray Balkanli
    Nov 11 at 22:56












up vote
1
down vote



accepted
+100







up vote
1
down vote



accepted
+100




+100




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.6
sudo apt-get update
sudo apt-get install python3.6
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --config python3


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






share|improve this answer












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.6
sudo apt-get update
sudo apt-get install python3.6
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --config python3


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







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 10 at 23:51









Eray Balkanli

3,87241943




3,87241943











  • Thank you for your contribution! I have a strong dependency on the version of Python 2.7.6, and I need to stay on Ubuntu 14.04.5 :( pip install urllib3 I get Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages. It won't install a newer version.
    – zabumba
    Nov 11 at 0:24










  • Try a different way to upgrade your urllib3 version maybe? u can download the tar.gz from the link in my answer and install manually?
    – Eray Balkanli
    Nov 11 at 0:27






  • 1




    not 100% sure but reinstalling "requests" might help the Request already satisfied issue as well, via "pip uninstall requests", then "pip install requests". I believe there is a very big chance this issue is related to the version of urllib3 that have been installed
    – Eray Balkanli
    Nov 11 at 0:32











  • Apparently can't uninstalled requests (owned by OS).
    – zabumba
    Nov 11 at 22:49






  • 1




    why u couldn't uninstall it, any error message??
    – Eray Balkanli
    Nov 11 at 22:56
















  • Thank you for your contribution! I have a strong dependency on the version of Python 2.7.6, and I need to stay on Ubuntu 14.04.5 :( pip install urllib3 I get Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages. It won't install a newer version.
    – zabumba
    Nov 11 at 0:24










  • Try a different way to upgrade your urllib3 version maybe? u can download the tar.gz from the link in my answer and install manually?
    – Eray Balkanli
    Nov 11 at 0:27






  • 1




    not 100% sure but reinstalling "requests" might help the Request already satisfied issue as well, via "pip uninstall requests", then "pip install requests". I believe there is a very big chance this issue is related to the version of urllib3 that have been installed
    – Eray Balkanli
    Nov 11 at 0:32











  • Apparently can't uninstalled requests (owned by OS).
    – zabumba
    Nov 11 at 22:49






  • 1




    why u couldn't uninstall it, any error message??
    – Eray Balkanli
    Nov 11 at 22:56















Thank you for your contribution! I have a strong dependency on the version of Python 2.7.6, and I need to stay on Ubuntu 14.04.5 :( pip install urllib3 I get Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages. It won't install a newer version.
– zabumba
Nov 11 at 0:24




Thank you for your contribution! I have a strong dependency on the version of Python 2.7.6, and I need to stay on Ubuntu 14.04.5 :( pip install urllib3 I get Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages. It won't install a newer version.
– zabumba
Nov 11 at 0:24












Try a different way to upgrade your urllib3 version maybe? u can download the tar.gz from the link in my answer and install manually?
– Eray Balkanli
Nov 11 at 0:27




Try a different way to upgrade your urllib3 version maybe? u can download the tar.gz from the link in my answer and install manually?
– Eray Balkanli
Nov 11 at 0:27




1




1




not 100% sure but reinstalling "requests" might help the Request already satisfied issue as well, via "pip uninstall requests", then "pip install requests". I believe there is a very big chance this issue is related to the version of urllib3 that have been installed
– Eray Balkanli
Nov 11 at 0:32





not 100% sure but reinstalling "requests" might help the Request already satisfied issue as well, via "pip uninstall requests", then "pip install requests". I believe there is a very big chance this issue is related to the version of urllib3 that have been installed
– Eray Balkanli
Nov 11 at 0:32













Apparently can't uninstalled requests (owned by OS).
– zabumba
Nov 11 at 22:49




Apparently can't uninstalled requests (owned by OS).
– zabumba
Nov 11 at 22:49




1




1




why u couldn't uninstall it, any error message??
– Eray Balkanli
Nov 11 at 22:56




why u couldn't uninstall it, any error message??
– Eray Balkanli
Nov 11 at 22:56












up vote
1
down vote













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.






share|improve this answer






















  • :( that didn't work for me, but thanks anyway
    – zabumba
    Nov 8 at 22:14














up vote
1
down vote













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.






share|improve this answer






















  • :( that didn't work for me, but thanks anyway
    – zabumba
    Nov 8 at 22:14












up vote
1
down vote










up vote
1
down vote









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.






share|improve this answer














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.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 10 at 22:49









zabumba

7,86263894




7,86263894










answered Nov 8 at 0:40









Sanket Parlikar

966




966











  • :( that didn't work for me, but thanks anyway
    – zabumba
    Nov 8 at 22:14
















  • :( that didn't work for me, but thanks anyway
    – zabumba
    Nov 8 at 22:14















:( that didn't work for me, but thanks anyway
– zabumba
Nov 8 at 22:14




:( that didn't work for me, but thanks anyway
– zabumba
Nov 8 at 22:14

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53199623%2ftypeerror-urlopen-got-multiple-values-for-keyword-argument-body-while-tryin%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo