SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
29.73k stars 8.02k forks source link

[🐛 Bug]: Missing dependency websocket-client in Python source package #14184

Open rolim opened 5 days ago

rolim commented 5 days ago

What happened?

When installing the source distribution of selenium-4.22.0, the required dependency "websocket-client>=1.8.0" is missing.

How can we reproduce the issue?

$ pip3 install selenium --no-binary selenium
$ python3 -c "from selenium import webdriver"

Relevant log output

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/venv/lib/python3.12/site-packages/selenium/webdriver/__init__.py", line 20, in <module>
    from .chrome.webdriver import WebDriver as Chrome  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/venv/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 18, in <module>
    from selenium.webdriver.chromium.webdriver import ChromiumDriver
  File "/tmp/venv/lib/python3.12/site-packages/selenium/webdriver/chromium/webdriver.py", line 22, in <module>
    from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
  File "/tmp/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 67, in <module>
    from .websocket_connection import WebSocketConnection
  File "/tmp/venv/lib/python3.12/site-packages/selenium/webdriver/remote/websocket_connection.py", line 23, in <module>
    from websocket import WebSocketApp
ModuleNotFoundError: No module named 'websocket'

Operating System

Ubuntu

Selenium version

4.22.0

What are the browser(s) and version(s) where you see this issue?

n/a

What are the browser driver(s) and version(s) where you see this issue?

n/a

Are you using Selenium Grid?

No response

github-actions[bot] commented 5 days ago

@rolim, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

titusfortner commented 5 days ago

Ah, we need to add it to the install requires section of the setup.py file

github-actions[bot] commented 5 days ago

This issue is looking for contributors.

Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.