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

Bug: tests fail because of changes in newest release of third party module "blinker" #329

Closed
mpibpc-mroose opened this issue Apr 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@mpibpc-mroose
Copy link

Hi,
I have failing Pylenium test for several projects. I get a stack trace like this:

ImportError: Failed to import test module: mini_adb.tests.tests_views
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/unittest/loader.py", line 419, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/unittest/loader.py", line 362, in _get_module_from_name
    __import__(name)
  File "/source/mini_adb/tests/tests_views.py", line 9, in <module>
    from core import unittest
  File "/source/core/unittest.py", line 26, in <module>
    from pylenium.driver import Pylenium
  File "/venv/lib/python3.11/site-packages/pylenium/driver.py", line 12, in <module>
    from pylenium import webdriver_factory
  File "/venv/lib/python3.11/site-packages/pylenium/webdriver_factory.py", line 15, in <module>
    from seleniumwire import webdriver as wire_driver
  File "/venv/lib/python3.11/site-packages/seleniumwire/webdriver.py", line 28, in <module>
    from seleniumwire import backend, utils
  File "/venv/lib/python3.11/site-packages/seleniumwire/backend.py", line 4, in <module>
    from seleniumwire.server import MitmProxy
  File "/venv/lib/python3.11/site-packages/seleniumwire/server.py", line 5, in <module>
    from seleniumwire.handler import InterceptRequestHandler
  File "/venv/lib/python3.11/site-packages/seleniumwire/handler.py", line 5, in <module>
    from seleniumwire import har
  File "/venv/lib/python3.11/site-packages/seleniumwire/har.py", line 11, in <module>
    from seleniumwire.thirdparty.mitmproxy import connections
  File "/venv/lib/python3.11/site-packages/seleniumwire/thirdparty/mitmproxy/connections.py", line 10, in <module>
    from seleniumwire.thirdparty.mitmproxy.net import tls, tcp
  File "/venv/lib/python3.11/site-packages/seleniumwire/thirdparty/mitmproxy/net/tls.py", line 15, in <module>
    import seleniumwire.thirdparty.mitmproxy.options
  File "/venv/lib/python3.11/site-packages/seleniumwire/thirdparty/mitmproxy/options.py", line 5, in <module>
    from seleniumwire.thirdparty.mitmproxy import optmanager
  File "/venv/lib/python3.11/site-packages/seleniumwire/thirdparty/mitmproxy/optmanager.py", line 9, in <module>
    import blinker._saferef
ModuleNotFoundError: No module named 'blinker._saferef'

I first looked into selenium-wire project, which is unmaintained. So my first recommendation would be to work on a replacement of this third party module.

As a temporary solution the blinkerdependency:

blinker<1.8

Adding this to my requirements.txt fixes the failing tests.

@joshuastegmaier
Copy link

Can report we're seeing this error in https://github.com/LibraryOfCongress/concordia as well.

@LostInDarkMath
Copy link
Contributor

I also have this issue.

@ElSnoMan
Copy link
Owner

I'm removing selenium-wire completely since it's deprecated/not-maintained #332

@ElSnoMan ElSnoMan added the bug Something isn't working label May 24, 2024
@ElSnoMan
Copy link
Owner

https://github.com/ElSnoMan/pyleniumio/releases/tag/v1.21.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants