nbQA: Command 'black' not found while running 'black' without nbqa works fine
When running nbqa black '<notebook_name>.ipynb'
I get the following error:
Traceback (most recent call last): File “/home/mikey/.local/bin/nbqa”, line 8, in <module> sys.exit(main()) File “/home/mikey/.local/lib/python3.6/site-packages/nbqa/main.py”, line 502, in main for i in cli_args.root_dirs File “/home/mikey/.local/lib/python3.6/site-packages/nbqa/main.py”, line 502, in <listcomp> for i in cli_args.root_dirs File “/home/mikey/.local/lib/python3.6/site-packages/nbqa/main.py”, line 446, in _run_on_one_root_dir _get_arg(root_dir, tmpdirname, nb_to_py_mapping, project_root), File “/home/mikey/.local/lib/python3.6/site-packages/nbqa/main.py”, line 360, in _run_command f"Command
{command}
not found. " ValueError: Commandblack
not found. Please make sure you have it installed before running nbqa on it.
While if I just run black <filename>.py
it works fine.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (6 by maintainers)
@m3h0w if you upgrade to version 0.3.1, then I’d like to this this should work
IMHO the security concerns are more for applications like a webservices. If you have access to the shell already, there is no need to use shell injections.
And I have no example for a tool that would require this, just a suggestion.
Hi @m3h0w
Massive thanks for your report!
A couple of questions:
nbqa --version
python -m black <filename>.py
, does it work?