Selenium: Resolving chrome webdriver.py error / throwing exception on python selenium

Operating System, Programming, Technology

Problem:

while running a selenium script, webdriver.py always throwing exception like :

File "C:\Python27\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 67, in __init__
desired_capabilities=desired_capabilities)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 87, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 141, in start_session
'desiredCapabilities': desired_capabilities,

even if I already used the correct chromedriver location:

browser = webdriver.Chrome("C:/Python27/chromedriver.exe")

the error still showed up.

CentOS: Fixing PYCURL ERROR 6 – “Couldn’t resolve host ‘mirrorlist.centos.org'” on yum update

Operating System, Technology

Problem:

Found this problem on Centos 6.4 x86_64 :
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'" Error: Cannot find a valid baseurl for repo: base

Solution:

And I tried to fix it by these steps:
1. edit network interface. For my case, I used eth0 in CentOS 6.X:
vim /etc/sysconfig/network-scripts/ifcfg-eth0
In CentOS 7.X you can use the ensxxx interface.

2. update NM_CONTROLLED to no