plone / plone/plonecli

OSError: [Errno 2] No such file or directory when running "plonecli create addon"

Open
#61 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

01 type: bug
Dominant language
Python
Stars
20
Forks
12
PR merge metrics
No merged PRs in 30d

Description

  • Plone CLI version: 1.1
  • Mr.Bob version: 5.1.1
  • Python version: 2.7.17
  • Operating System: Ubuntu 18.04
Description

Was attempting to create and build an addon.
I expected it to generate the add-on without error.
The add-on is successfully created but there is an error:

  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
What I Did

I ran plonecli create addon
The output is shown below.

plonecli create addon myplone.example2

RUN: mrbob bobtemplates.plone:addon -O myplone.example2

Welcome to mr.bob interactive mode. Before we generate directory structure, some questions need to be answered.

Answer with a question mark to display help.
Values in square brackets at the end of the questions show the default value if there is no answer.


--> Author's name [FakeGitUserOrEmail]: 

--> Author's email [FakeGitUserOrEmail]: 

--> Author's GitHub username: pigeonflight

--> Package description [An add-on for Plone]: 

--> Do you want me to initialze a GIT repository in your new package? (y/n) [y]: 

--> Plone version [5.2.1]: 

--> Python version for virtualenv [python3.7]: 

--> Do you want me to activate VS Code support? (y/n) [y]: 


Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/mrbob", line 11, in <module>
    sys.exit(main())
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mrbob/cli.py", line 175, in main
    c.render()
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mrbob/configurator.py", line 199, in render
    f(self)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/bobtemplates/plone/addon.py", line 141, in post_render
    run_isort(configurator)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/bobtemplates/plone/utils.py", line 76, in run_isort
    cwd=root_folder,
  File "/usr/lib/python2.7/subprocess.py", line 216, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the post_render path in bobtemplates/plone/addon.py and the run_isort call in bobtemplates/plone/utils.py. Reproduce plonecli create addon myplone.example2 and inspect which subprocess executable is missing when run_isort runs. Done means addon creation completes without the OSError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.