What happened?
When using the last image 2.28.0 on a Mac M1 (MacOS v14.5), an error shows up right after launching an analysis.
I'm on a fresh new install of Docker, and I've tried with version 2.27.1, which works fine.
The message is asyncio.run() cannot be called from a running event loop
Thank you!
Project
Ecoindex CLI
What OS do you use?
Mac
urls
No response
Relevant log output
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/local/lib/python3.12/site-packages/ecoindex/cli/app.py:228 in analyze │
│ │
│ 225 │ │ count_errors = 0 │
│ 226 │ │ task = progress.add_task("Processing", total=len(urls) * len(window_sizes)) │
│ 227 │ │ │
│ ❱ 228 │ │ analysis_results = run( │
│ 229 │ │ │ bulk_analysis( │
│ 230 │ │ │ │ max_workers=max_workers, │
│ 231 │ │ │ │ urls=urls, │
│ │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ count_errors = 0 │ │
│ │ export_format = <ExportFormat.csv: 'csv'> │ │
│ │ file_prefix = 'www.ecoindex.fr' │ │
│ │ html_report = True │ │
│ │ html_report_language = <Language.en: 'en'> │ │
│ │ input_file = '/tmp/ecoindex-cli/input/www.ecoindex.fr.csv' │ │
│ │ logger_file = '/tmp/ecoindex-cli/logs/www.ecoindex.fr.log' │ │
│ │ max_workers = 8 │ │
│ │ no_interaction = False │ │
│ │ output_file = None │ │
│ │ progress = <rich.progress.Progress object at 0xffff643b1100> │ │
│ │ recursive = False │ │
│ │ results = [] │ │
│ │ sitemap = None │ │
│ │ task = 0 │ │
│ │ tmp_folder = '/tmp/ecoindex-cli' │ │
│ │ url = ['https://www.ecoindex.fr'] │ │
│ │ urls = {Url('https://www.ecoindex.fr/')} │ │
│ │ urls_file = None │ │
│ │ wait_after_scroll = 3 │ │
│ │ wait_before_scroll = 3 │ │
│ │ window_size = ['1920,1080'] │ │
│ │ window_sizes = [WindowSize(height=1080, width=1920)] │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.12/asyncio/runners.py:194 in run │
│ │
│ 191 │ │ │ "asyncio.run() cannot be called from a running event loop") │
│ 192 │ │
│ 193 │ with Runner(debug=debug, loop_factory=loop_factory) as runner: │
│ ❱ 194 │ │ return runner.run(main) │
│ 195 │
│ 196 │
│ 197 def _cancel_all_tasks(loop): │
│ │
│ ╭──────────────────────────────── locals ─────────────────────────────────╮ │
│ │ debug = None │ │
│ │ loop_factory = None │ │
│ │ main = <async_generator object bulk_analysis at 0xffff5f292820> │ │
│ │ runner = <asyncio.runners.Runner object at 0xffff5f22ef60> │ │
│ ╰─────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.12/asyncio/runners.py:89 in run │
│ │
│ 86 │ def run(self, coro, *, context=None): │
│ 87 │ │ """Run a coroutine inside the embedded event loop.""" │
│ 88 │ │ if not coroutines.iscoroutine(coro): │
│ ❱ 89 │ │ │ raise ValueError("a coroutine was expected, got {!r}".format(coro)) │
│ 90 │ │ │
│ 91 │ │ if events._get_running_loop() is not None: │
│ 92 │ │ │ # fail fast with short traceback │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ context = None │ │
│ │ coro = <async_generator object bulk_analysis at 0xffff5f292820> │ │
│ │ self = <asyncio.runners.Runner object at 0xffff5f22ef60> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: a coroutine was expected, got <async_generator object bulk_analysis at 0xffff5f292820>
Code of Conduct
What happened?
When using the last image 2.28.0 on a Mac M1 (MacOS v14.5), an error shows up right after launching an analysis.
I'm on a fresh new install of Docker, and I've tried with version 2.27.1, which works fine.
The message is
asyncio.run() cannot be called from a running event loopThank you!
Project
Ecoindex CLI
What OS do you use?
Mac
urls
No response
Relevant log output
Code of Conduct