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

reuse_port not supported by socket module on Windows + Winloop #412

Open
1 task done
TheRealMkadmi opened this issue Nov 30, 2024 · 0 comments
Open
1 task done
Labels

Comments

@TheRealMkadmi
Copy link

Describe the bug

When running this code:

async def main_async(file_path: str): loop = asyncio.get_event_loop() async with aiomonitor.start_monitor(loop, hook_task_factory=True): # ....... any code

This exception is raised:

File "C:\<path>\venv\Lib\site-packages\aiohttp\web_runner.py", line 119, in start self._server = await loop.create_server( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "winloop\loop.pyx", line 1736, in create_server ValueError: reuse_port not supported by socket module

To Reproduce

  1. install winloop on Python 3.11.9
  2. run any monitoring task as per documentation

Expected behavior

Monitoring starts normally.

Logs/tracebacks

Exception in thread Thread-1 (_ui_main):
Traceback (most recent call last):
  File "C:\<path>\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "C:\<path>\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "C:\<path>\Lib\site-packages\aiomonitor\monitor.py", line 546, in _ui_main
    asyncio.run(self._ui_main_async())
  File "C:\<path>\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\<path>\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "winloop\loop.pyx", line 1520, in winloop.loop.Loop.run_until_complete
  File "C:\<path>\Lib\site-packages\aiomonitor\monitor.py", line 574, in _ui_main_async
    await webui_site.start()
  File "C:\<path>\Lib\site-packages\aiohttp\web_runner.py", line 119, in start
    self._server = await loop.create_server(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "winloop\loop.pyx", line 1736, in create_server
ValueError: reuse_port not supported by socket module

Python Version

$ Python 3.11.0

aiomonitor Version

Name: aiomonitor
Version: 0.7.1
Summary: Adds monitor and Python REPL capabilities for asyncio applications
Home-page: https://github.com/aio-libs/aiomonitor
Author: Nikolay Novik
Author-email: [email protected]
License: Apache-2.0
Location: C:\Users\Wahib\Desktop\Workbench\repos\cpanel-cracker\venv\Lib\site-packages
Requires: aioconsole, aiohttp, attrs, click, janus, jinja2, prompt-toolkit, telnetlib3, terminaltables, trafaret, typing-extensions
Required-by:

OS

Windows 11 24H2 - Build 26100.2454

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant