plasma-umass / BLeak

BLeak: Automatically Debugging Memory Leaks in Web Applications
MIT License
408 stars 41 forks source link

TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary #85

Open joncarr opened 1 year ago

joncarr commented 1 year ago

I am receiving the following error. I've tried to search for a solution but it seems like the websockets maintainer is saying it's an asyncio issue and well, that repo is gone?

I've tried with Python 3.6 up to latest version with same results. The following error repeated a numerous number of times.

Is there any guidance on this issue?? I REALLY need this to work.

TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary
[mitmproxy-node plugin] Unexpected error: (<class 'TypeError'>, TypeError('As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary'), <traceback object at 0x7f7da2f57e80>)
Traceback (most recent call last):
  File "/home/jec/.nvm/versions/node/v16.19.0/lib/node_modules/bleak-detector/node_modules/mitmproxy/scripts/proxy.py", line 221, in websocket_loop
    async with websockets.connect('ws://localhost:8765', max_size = None) as websocket:
  File "/home/jec/.local/lib/python3.10/site-packages/websockets/py35/client.py", line 2, in __aenter__
    return await self
  File "/home/jec/.local/lib/python3.10/site-packages/websockets/py35/client.py", line 12, in __await_impl__
    transport, protocol = await self._creating_connection
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1089, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1107, in _create_connection_transport
    protocol = protocol_factory()
  File "/home/jec/.local/lib/python3.10/site-packages/websockets/client.py", line 365, in <lambda>
    factory = lambda: create_protocol(
  File "/home/jec/.local/lib/python3.10/site-packages/websockets/client.py", line 45, in __init__
    super().__init__(**kwds)
  File "/home/jec/.local/lib/python3.10/site-packages/websockets/protocol.py", line 172, in __init__
    self._drain_lock = asyncio.Lock(loop=loop)
  File "/usr/lib/python3.10/asyncio/locks.py", line 78, in __init__
    super().__init__(loop=loop)
  File "/usr/lib/python3.10/asyncio/mixins.py", line 17, in __init__
    raise TypeError(

This is WSL on the latest kernel, btw. Really struggling to track tis one down. When I had a look at proxy.py at the loop mentioned on Line 221, I couldn't find Lock() being used.. ???