cli: pio ci 'target' for the run is None with click 8.0.2
See original GitHub issueConfiguration
Operating system:
Debian GNU/Linux 11 (bullseye)
PlatformIO Version (platformio --version
):
PlatformIO Core, version 5.2.1rc1 PlatformIO Core, version 5.2.0
Description of problem
After pulling today’s Click 8.0.2, there is an issue with the implicit default
for the ‘–target’
Error: Traceback (most recent call last):
File "/home/runner/pio-test/lib/python3.9/site-packages/platformio/__main__.py", line 130, in main
cli() # pylint: disable=no-value-for-parameter
File "/home/runner/pio-test/lib/python3.9/site-packages/click/core.py", line 1126, in __call__
return self.main(*args, **kwargs)
File "/home/runner/pio-test/lib/python3.9/site-packages/click/core.py", line 1051, in main
rv = self.invoke(ctx)
File "/home/runner/pio-test/lib/python3.9/site-packages/platformio/commands/__init__.py", line 44, in invoke
return super(PlatformioCLI, self).invoke(ctx)
File "/home/runner/pio-test/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/runner/pio-test/lib/python3.9/site-packages/click/core.py", line 1393, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/runner/pio-test/lib/python3.9/site-packages/click/core.py", line 752, in invoke
return __callback(*args, **kwargs)
File "/home/runner/pio-test/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/runner/pio-test/lib/python3.9/site-packages/platformio/commands/ci.py", line 119, in cli
ctx.invoke(cmd_run, project_dir=build_dir, verbose=verbose)
File "/home/runner/pio-test/lib/python3.9/site-packages/click/core.py", line 752, in invoke
return __callback(*args, **kwargs)
File "/home/runner/pio-test/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/runner/pio-test/lib/python3.9/site-packages/platformio/commands/run/command.py", line 135, in cli
process_env(
File "/home/runner/pio-test/lib/python3.9/site-packages/platformio/commands/run/command.py", line 174, in process_env
ep = EnvironmentProcessor(
File "/home/runner/pio-test/lib/python3.9/site-packages/platformio/commands/run/processor.py", line 29, in __init__
self.targets = [str(t) for t in targets]
TypeError: 'NoneType' object is not iterable
Tracing both ci
and run
, target
is set to ()
when run
is called normally as run()
. But, when used through ctx.invoke(cmd_run)
it is set to None
which breaks the rest of the logic in the command.
But, not yet sure whether this was an intended change from the Click 8 release, or something broken in the context generation. Or, whether the default=()
should be set explicitly in the PIO.
Steps to Reproduce
$ pip install click==8.0.2
$ pio ci <anything> --board nodemcuv2
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
8.0.2 doesn't validate paths correctly · Issue #2088 · pallets/click
from click import Path >>> p = Path(dir_okay=False, exists=True, ... cli: pio ci 'target' for the run is None with click 8.0.2 ......
Read more >pio run — PlatformIO latest documentation
Run project targets over environments declared in “platformio.ini” (Project ... It's also possible to list targets per project environment using pio run ......
Read more >Untitled
Narcissus flycatcher song, Toca band no sound, Iphone 6 jailbreak 8.0.2 mac, ... Basix bubnjevi cena, Click on mem patch autocad, 10 slip...
Read more >Untitled
Gold canyon resort weddings, Fssda, Si 1999 no 3312, Dunstable priory ... Under armour kids running shoes, Kiaa1549 function, Us open 2012 prize...
Read more >Untitled
Certifica de non gage voiture, Caped coat men, New blood elf tyrande, ... Grave stone clip art, Waterfall style crossfit, Kinjal rajpriya history, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mcspr , @franky47 , please add the next lines to your CLI workflow until we didn’t fix this issue:
Temporary solutions (use of one them):