Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pigeonflight opened this issue Oct 2, 2020 · 1 comment

Comments

@pigeonflight
Copy link
Member

pigeonflight commented Oct 2, 2020

  • 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
@riker1
Copy link

riker1 commented Nov 20, 2020

I have an existing project and I get a similar error when I create a new view. Tried py3 and build failed, using 2.7.x I build os ok but running any command seems to end in Error 2.

RUN: mrbob bobtemplates.plone:view
Traceback (most recent call last):
File "../../bin/plonecli", line 8, in
sys.exit(cli())
File "/Users/etyrer/Development/Plone/zeocluster/lib/python2.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/Users/etyrer/Development/Plone/zeocluster/lib/python2.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/etyrer/Development/Plone/zeocluster/lib/python2.7/site-packages/click/core.py", line 1289, in invoke
rv.append(sub_ctx.command.invoke(sub_ctx))
File "/Users/etyrer/Development/Plone/zeocluster/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/etyrer/Development/Plone/zeocluster/lib/python2.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/etyrer/Development/Plone/zeocluster/lib/python2.7/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/etyrer/Development/Plone/zeocluster/lib/python2.7/site-packages/plonecli/cli.py", line 89, in add
subprocess.call(['mrbob', bobtemplate])
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants