Errors when setting @click.option("--use_push_notifications", default=True)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
The error occurs in hosts/cli/main.py at line 27 when trying to import PushNotificationListener. Start by examining the relative import structure and the condition that triggers this import. Check how the --use_push_notifications flag is handled and ensure the module path is correct when the flag is True. Run the CLI with the flag set to True to reproduce the error and verify the fix.
Written by the indexing model from the issue text.
Description
When running the CLI and changing line 13 from @click.option("--use_push_notifications", default=False) to @click.option("--use_push_notifications", default=True) I would expect this to work.
The follow errors occur:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\rickcau\source\repos\A2A\samples\python\hosts\cli_main.py", line 115, in
asyncio.run(cli())
~~~^^
File "C:\Users\rickcau\source\repos\A2A\samples\python.venv\Lib\site-packages\asyncclick\core.py", line 1211, in call
return anyio.run(self._main, main, args, kwargs, **opts)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rickcau\source\repos\A2A\samples\python.venv\Lib\site-packages\anyio_core_eventloop.py", line 74, in run
return async_backend.run(func, args, {}, backend_options)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rickcau\source\repos\A2A\samples\python.venv\Lib\site-packages\anyio_backends_asyncio.py", line 2310, in run
return runner.run(wrapper())
~~~~~~~~~~^^^^^^^^^^^
File "C:\Users\rickcau\AppData\Roaming\uv\python\cpython-3.13.3-windows-x86_64-none\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "C:\Users\rickcau\AppData\Roaming\uv\python\cpython-3.13.3-windows-x86_64-none\Lib\asyncio\base_events.py", line 719, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "C:\Users\rickcau\source\repos\A2A\samples\python.venv\Lib\site-packages\anyio_backends_asyncio.py", line 2298, in wrapper
return await func(*args)
^^^^^^^^^^^^^^^^^
File "C:\Users\rickcau\source\repos\A2A\samples\python.venv\Lib\site-packages\asyncclick\core.py", line 1214, in main
return await main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rickcau\source\repos\A2A\samples\python.venv\Lib\site-packages\asyncclick\core.py", line 1126, in main
rv = await self.invoke(ctx)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rickcau\source\repos\A2A\samples\python.venv\Lib\site-packages\asyncclick\core.py", line 1496, in invoke
return await ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rickcau\source\repos\A2A\samples\python.venv\Lib\site-packages\asyncclick\core.py", line 829, in invoke
rv = await rv
^^^^^^^^
File "C:\Users\rickcau\source\repos\A2A\samples\python\hosts\cli_main.py", line 27, in cli
from .push_notification_listener import PushNotificationListener
ImportError: attempted relative import with no known parent package
- Dominant language
- Jupyter Notebook
- Stars
- 1.8k
- Forks
- 759
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from a2aproject/a2a-samples
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
a2aproject/a2a-samples#696 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
a2aproject/a2a-samples#686 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
a2aproject/a2a-samples#597 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
a2aproject/a2a-samples#551 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
a2aproject/a2a-samples#529 · 2 comments · 1 reaction ·
All issues in a2aproject/a2a-samples
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
from:qa priority:P2 reliability tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spec-kitty/spec-kitty#4874 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
automation code-quality cookie deep-report documentation improvement quick-win task-mining
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100