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

Failure to execute on Python 3.10: loop parameter was removed from asyncio.wait_for #29

Open
paulo-raca opened this issue Jul 18, 2022 · 1 comment · May be fixed by #30
Open

Failure to execute on Python 3.10: loop parameter was removed from asyncio.wait_for #29

paulo-raca opened this issue Jul 18, 2022 · 1 comment · May be fixed by #30

Comments

@paulo-raca
Copy link

$ aioupnp get_external_ip
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<Gateway._discover_gateway() done, defined at /media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/gateway.py:197> exception=UPnPError(TypeError('As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary'))>
Traceback (most recent call last):
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 141, in listen_ssdp
    listen_result: Tuple[asyncio.BaseTransport, asyncio.BaseProtocol] = await loop.create_datagram_endpoint(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1373, in create_datagram_endpoint
    protocol = protocol_factory()
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 142, in <lambda>
    lambda: SSDPProtocol(SSDP_IP_ADDRESS, lan_address), sock=sock
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 34, in __init__
    self.connected = asyncio.Event(loop=self.loop)
  File "/usr/lib/python3.10/asyncio/locks.py", line 168, in __init__
    super().__init__(loop=loop)
  File "/usr/lib/python3.10/asyncio/mixins.py", line 17, in __init__
    raise TypeError(
TypeError: As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/gateway.py", line 201, in _discover_gateway
    ssdp_proto = await multi_m_search(
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 171, in multi_m_search
    protocol, gateway_address, lan_address = await listen_ssdp(
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 147, in listen_ssdp
    raise UPnPError(err)
aioupnp.fault.UPnPError: As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary
Traceback (most recent call last):
  File "/media/Paulo/home//.local/bin/aioupnp", line 8, in <module>
    sys.exit(main())
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/__main__.py", line 117, in main
    run_cli(
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/upnp.py", line 434, in run_cli
    loop.run_until_complete(wrapper())
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/upnp.py", line 410, in wrapper
    u = await UPnP.discover(
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/upnp.py", line 56, in discover
    gateway = await Gateway.discover_gateway(
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/gateway.py", line 225, in discover_gateway
    return await asyncio.wait_for(loop.create_task(
TypeError: wait_for() got an unexpected keyword argument 'loop'
@slk9
Copy link

slk9 commented May 4, 2023

Any plans to fix python 3.10+ support?

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

Successfully merging a pull request may close this issue.

2 participants