Skip to content

Selenium 3 is incompatible with Python 3.9 #8762

Closed
@tari

Description

@tari

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions