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

Selenium 3 is incompatible with Python 3.9 #8762

Closed
tari opened this issue Oct 7, 2020 · 2 comments
Closed

Selenium 3 is incompatible with Python 3.9 #8762

tari opened this issue Oct 7, 2020 · 2 comments

Comments

@tari
Copy link

tari commented Oct 7, 2020

🐛 Bug Report

There may be more issues than just this one, but in running tests on Python 3.9 I've encountered this error:

Traceback (most recent call last):
  File "/builds/cemetech/7/archives/tests/test_create_file.py", line 293, in testAutofillsFilename
    file_input.send_keys(tempfile1.name)
  File "/builds/cemetech/7/.venv/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 475, in send_keys
    value = self._upload(local_file)
  File "/builds/cemetech/7/.venv/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 695, in _upload
    content = base64.encodestring(fp.getvalue())
AttributeError: module 'base64' has no attribute 'encodestring'

This appears to have been fixed in #7446, but is not present in any stable releases on pypi.

Either the 3.x series on PyPi should be marked as incompatible with Python 3.9, or #7446 should be backported and a new Python release cut.

Environment

OS: Linux
Browser: Firefox
Language Bindings version: Python 3.141.0

@ghost ghost added the needs-triaging label Oct 7, 2020
@AutomatedTester
Copy link
Member

Hi

Thanks for the issue. We won't be releasing another version 3 as we're heading to finishing off Selenium 4. It is a drop in replacement to use Selenium 4.0.0.a5 so should work the same. There should not be any breaking changes.

nijel added a commit to WeblateOrg/weblate that referenced this issue Oct 13, 2020
It needs Selenium 4, the 3.x series is not compatible with Python 3.9,
see SeleniumHQ/selenium#8762

This also simplifies test matrix by including wanted test combinations
instead of excluding all the ones we want to skip in more complex
setups.
@Surabhi228
Copy link

is this resolved? how to install selenium in python 3.9

@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants