Package Details: python-selenium 4.24.0-1

Git Clone URL: https://aur.archlinux.org/python-selenium.git (read-only, click to copy)
Package Base: python-selenium
Description: Python language bindings for Selenium WebDriver
Upstream URL: https://github.com/SeleniumHQ/selenium
Licenses: Apache-2.0
Submitter: jelly
Maintainer: carsme
Last Packager: carsme
Votes: 28
Popularity: 1.48
First Submitted: 2022-01-23 14:41 (UTC)
Last Updated: 2024-09-04 08:09 (UTC)

Latest Comments

1 2 3 4 5 Next › Last »

macxcool commented on 2024-09-11 20:29 (UTC)

Does anyone have a working PKGBUILD, or an idea of what needs to be changed for this to work?

Archislove commented on 2024-09-07 09:05 (UTC) (edited on 2024-09-07 09:19 (UTC) by Archislove)

Update to 4.24.0-1 fails with

collect2: error: ld returned 1 exit status
= note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)
error: could not compile `selenium-manager` (bin "selenium-manager") due to 1 previous error

At the beginning of the update there were these warnings:

running egg_info
writing selenium.egg-info/PKG-INFO
writing dependency_links to selenium.egg-info/dependency_links.txt
writing requirements to selenium.egg-info/requires.txt
writing top-level names to selenium.egg-info/top_level.txt
reading manifest file 'selenium.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.py' under directory 'selenium/webdriver/common/html5'
warning: no files found matching '*.py' under directory 'selenium/webdriver/phantomjs'
warning: no files found matching '*.xpi' under directory 'selenium/webdriver/firefox'
warning: no files found matching '*.json' under directory 'selenium/webdriver/firefox'
warning: no files found matching '*.js' under directory 'selenium/webdriver/remote'
warning: no files found matching 'selenium/selenium.py'
warning: no files found matching 'selenium/webdriver/common/linux/selenium-manager'
warning: no files found matching 'selenium/webdriver/common/macos/selenium-manager'
warning: no files found matching 'selenium/webdriver/common/windows/selenium-manager.exe'
warning: no files found matching 'LICENSE'
writing manifest file 'selenium.egg-info/SOURCES.txt'
/usr/lib/python3.12/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'selenium.webdriver.common.actions' is absent from the `packages` configuration.
!!
    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'selenium.webdriver.common.actions' as an importable package[^1],
    but it is absent from setuptools' `packages` configuration.

    This leads to an ambiguous overall configuration. If you want to distribute this
    package, please make sure that 'selenium.webdriver.common.actions' is explicitly added
    to the `packages` configuration field.

    Alternatively, you can also rely on setuptools' discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).

    You can read more about "package discovery" on setuptools documentation page:

    - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

    If you don't want 'selenium.webdriver.common.actions' to be distributed and are
    already explicitly excluding 'selenium.webdriver.common.actions' via
    `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
    you can try to use `exclude_package_data`, or `include-package-data=False` in
    combination with a more fine grained `package-data` configuration.

    You can read more about "package data files" on setuptools documentation page:

    - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


    [^1]: For Python, any directory (with suitable naming) can be imported,
          even if it does not contain any `.py` files.
          On the other hand, currently there is no concept of package data
          directory, all directories are treated like packages.
!!
check.warn(importable)
/usr/lib/python3.12/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'selenium.webdriver.common.bidi' is absent from the `packages` configuration.

cprn commented on 2024-09-06 07:54 (UTC) (edited on 2024-09-06 09:20 (UTC) by cprn)

It seems the new version of the package is missing files. Since update, I'm having the following issue:

Traceback (most recent call last):
  [...]
  File "/home/user/Projects/daemon/./main.py", line 225, in __init__
    self.url = element.find_element(by=By.CLASS_NAME, value="__icon").get_attribute("href")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/selenium/webdriver/remote/webelement.py", line 177, in get_attribute
    _load_js()
  File "/usr/lib/python3.12/site-packages/selenium/webdriver/remote/webelement.py", line 48, in _load_js
    getAttribute_js = pkgutil.get_data(_pkg, "getAttribute.js").decode("utf8")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/pkgutil.py", line 453, in get_data
    return loader.get_data(resource_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 1186, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.12/site-packages/selenium/webdriver/remote/getAttribute.js'

The package should install required JS wrappings as well. As a workaround, I replaced all calls to get_attribute() with get_dom_attribute() in my application, but it probably won't be suitable for more complicated cases.

evrusnex commented on 2024-09-04 22:11 (UTC) (edited on 2024-09-04 22:12 (UTC) by evrusnex)


==> Making package: python-selenium 4.24.0-1 (Wed 04 Sep 2024 22:05:32 UTC)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found python-selenium-4.24.0.tar.gz
-> Found fix-selenium-manager-build.patch
==> Validating source files with sha256sums...
python-selenium-4.24.0.tar.gz ... Passed
fix-selenium-manager-build.patch ... Passed
==> Extracting sources...
-> Extracting python-selenium-4.24.0.tar.gz with bsdtar
==> Starting prepare()...
patching file py/setup.py
==> Starting build()...
/evrusnex/.espressif/python_env/idf5.3_py3.12_env/bin/python: No module named build
==> ERROR: A failure occurred in build().

macxcool commented on 2024-09-04 20:23 (UTC) (edited on 2024-09-04 20:24 (UTC) by macxcool)

Yes. I get:

patching file py/setup.py
    Updating crates.io index
error: failed to select a version for `env_logger`.
    ... required by package `selenium-manager v0.4.24 (/home/<USER>/.cache/paru/clone/python-selenium/src/selenium-selenium-4.24.0/rust)`
versions that meet the requirements `^0.11.5` (locked to 0.11.5) are: 0.11.5

the package `selenium-manager` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
 It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.


failed to select a version for `env_logger` which could resolve this conflict
==> ERROR: A failure occurred in prepare().
    Aborting...
error: failed to build 'python-selenium-4.24.0-1': 
error: packages failed to build: python-selenium-4.24.0-1

kbipinkumar commented on 2024-09-02 04:27 (UTC)

version 4.24.0 seems to have updated dependencies.

==> Starting build()...
* Getting build dependencies for wheel...
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
    main()
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 134, in get_requires_for_build_wheel
    return hook(config_settings)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=['wheel'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
    self.run_setup()
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
    exec(code, locals())
  File "<string>", line 22, in <module>
ModuleNotFoundError: No module named 'setuptools_rust'

alibiloon commented on 2024-07-22 20:19 (UTC)

@jgodden thank you so much man this worked for me my script is running again

Mailaender commented on 2024-05-21 16:26 (UTC)

I get a lot of formatting(?) errors in the unit tests:

FAILED build/lib/selenium/webdriver/common/selenium_manager.py::ruff::format - pytest_ruff.RuffError: File would be reformatted
[...]

which causes the package build to fail. I can only install this with paru python-selenium --nocheck because of failing unit tests.

petronny commented on 2023-09-18 09:37 (UTC) (edited on 2023-09-18 10:17 (UTC) by petronny)

And it's also possible to fix the NoSuchDriverException with out installing selenium-manager. In my case, I'm using the geckodriver and I update my code from

with webdriver.Firefox() as driver:

to

from selenium.webdriver.firefox.service import Service

with webdriver.Firefox(service=Service('/usr/bin/geckodriver')) as driver:

and everything works again.

PS. To further disable the warning about log_output:

with webdriver.Firefox(service=Service('/usr/bin/geckodriver', log_output=sys.stderr)) as driver:

or so on.