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

[NODRIVER] websockets dependency version issue: AttributeError: 'NoneType' object has no attribute 'closed' #2093

Open
falmar opened this issue Nov 25, 2024 · 0 comments

Comments

@falmar
Copy link

falmar commented Nov 25, 2024

Hello,

I've been facing this issue lately when updating my docker images. Pip is installing websockets v14 which causes the error below.

Traceback (most recent call last):
[redacted]
    return await uc.start(config)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "[redacted]/nodriver/core/util.py", line 95, in start
    return await Browser.create(config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[redacted]/nodriver/core/browser.py", line 92, in create
    await instance.start()
  File "[redacted]/nodriver/core/browser.py", line 395, in start
    await self.connection.send(cdp.target.set_discover_targets(discover=True))
  File "[redacted]/nodriver/core/connection.py", line 405, in send
    if not self.websocket or self.closed:
                             ^^^^^^^^^^^
  File "[redacted]/nodriver/core/connection.py", line 361, in __getattr__
    return getattr(self.target, item)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'closed'

websockets provides the upgrade guide in regards new asyncio client implementation

Quick Fix: pip install nodriver websockets==13.0 solves the issue for now

@falmar falmar changed the title [nodriver] websockets dependency version issue: AttributeError: 'NoneType' object has no attribute 'closed' [NODRIVER] websockets dependency version issue: AttributeError: 'NoneType' object has no attribute 'closed' Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant