Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest google release at https://sites.google.com/a/chromium.org/chromedriver/downloads breaks chromedriver_installer #9

Open
jharveysmith opened this issue Feb 6, 2019 · 5 comments

Comments

@jharveysmith
Copy link

jharveysmith commented Feb 6, 2019

$ pip install chromedriver_installer
Collecting chromedriver_installer
  Using cached https://files.pythonhosted.org/packages/c8/01/0a8a725bb605f68923aba16099a01cbbfe547c8b7dc96fd9a554424f6524/chromedriver_installer-0.0.6.tar.gz
Building wheels for collected packages: chromedriver-installer
  Running setup.py bdist_wheel for chromedriver-installer ... error
  Complete output from command /home/ubuntu/.venv/pr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-0napzveo/chromedriver-installer/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-mb8ywpxd --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/chromedriver_installer
  copying chromedriver_installer/__init__.py -> build/lib/chromedriver_installer
  running build_scripts
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-0napzveo/chromedriver-installer/setup.py", line 220, in <module>
      cmdclass=dict(build_scripts=BuildScripts, install=Install)
    File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/ubuntu/.venv/pr/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 188, in run
      self.run_command('build')
    File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.6/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-0napzveo/chromedriver-installer/setup.py", line 119, in run
      chromedriver_version = get_chromedriver_version()
    File "/tmp/pip-install-0napzveo/chromedriver-installer/setup.py", line 47, in get_chromedriver_version
      .format(CHROMEDRIVER_INFO_URL))
  Exception: Unable to get latest chromedriver version from https://sites.google.com/a/chromium.org/chromedriver/downloads
  
  ----------------------------------------
  Failed building wheel for chromedriver-installer
  Running setup.py clean for chromedriver-installer
Failed to build chromedriver-installer
Installing collected packages: chromedriver-installer
  Running setup.py install for chromedriver-installer ... error
    Complete output from command /home/ubuntu/.venv/pr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-0napzveo/chromedriver-installer/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-urk9zw8c/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/.venv/pr/include/site/python3.6/chromedriver-installer:
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/chromedriver_installer
    copying chromedriver_installer/__init__.py -> build/lib/chromedriver_installer
    running build_scripts
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-0napzveo/chromedriver-installer/setup.py", line 220, in <module>
        cmdclass=dict(build_scripts=BuildScripts, install=Install)
      File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-0napzveo/chromedriver-installer/setup.py", line 190, in run
        install.run(self)
      File "/usr/local/lib/python3.6/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-0napzveo/chromedriver-installer/setup.py", line 119, in run
        chromedriver_version = get_chromedriver_version()
      File "/tmp/pip-install-0napzveo/chromedriver-installer/setup.py", line 47, in get_chromedriver_version
        .format(CHROMEDRIVER_INFO_URL))
    Exception: Unable to get latest chromedriver version from https://sites.google.com/a/chromium.org/chromedriver/downloads
    
    ----------------------------------------
Command "/home/ubuntu/.venv/pr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-0napzveo/chromedriver-installer/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-urk9zw8c/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/.venv/pr/include/site/python3.6/chromedriver-installer" failed with error code 1 in /tmp/pip-install-0napzveo/chromedriver-installer/
@conradolega
Copy link

This package looks for the string Latest Release on the Chromedriver site to get the latest version (see this version of the page from January). The copy on the site changed, breaking this package.

Checking https://chromedriver.storage.googleapis.com/LATEST_RELEASE seems to be a better approach.

@jharveysmith
Copy link
Author

Unfortunately, the latest version is 73.0.3683.20 and the https://chromedriver.storage.googleapis.com/LATEST_RELEASE still returns 2.46

@pgAdmin
Copy link

pgAdmin commented Feb 7, 2019

This can fix the installation till a proper fix is found.
#10

@LennyLip
Copy link

LennyLip commented Mar 9, 2020

Same error here

@ominaik7
Copy link

Change

 CHROMEDRIVER_INFO_URL = (
    'http://chromedriver.storage.googleapis.com/LATEST_RELEASE'
)

to this url in setup.py

and change get_chromedriver_version match variable to to this

def get_chromedriver_version():
    """Retrieves the most recent chromedriver version."""
    global chromedriver_version

    response = request.urlopen(CHROMEDRIVER_INFO_URL)
    content = response.read()
    match = content.decode("utf-8")
    if match:
        return match
    else:
        raise Exception('Unable to get latest chromedriver version from {0}'
                        .format(CHROMEDRIVER_INFO_URL))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants