ianmiell / shutit

Automation framework for programmers
http://ianmiell.github.io/shutit/
MIT License
2.15k stars 110 forks source link

Running shutit skeleton throws an error trying to create directory #319

Closed gaviriar closed 6 years ago

gaviriar commented 6 years ago

Hi There,

I am trying to run shutit skeleton and am faced with the following error when pressing enter to confirm the project directory:

>> /home/unitelabs/projects/shutitskel_feeder
Traceback (most recent call last):
  File "/home/unitelabs/.virtualenvs/idorsia/bin/shutit", line 11, in <module>
    sys.exit(main())
  File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit.py", line 72, in main
    shutit.setup_shutit_obj()
  File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit_class.py", line 4126, in setup_shutit_obj
    self.parse_args()
  File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit_class.py", line 3757, in parse_args
    vagrant_image_name=args.vagrant_image_name))
  File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit_class.py", line 3260, in process_args
    self.handle_skeleton(args)
  File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit_class.py", line 3370, in handle_skeleton
    module_directory = shutit_util.util_raw_input(prompt='\n>> ', default=default_dir)
  File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit_util.py", line 258, in util_raw_input
    return input(prompt).strip() or default
  File "<string>", line 1
    /home/unitelabs/projects/shutitskel_feeder
    ^
SyntaxError: invalid syntax

OS: Ubuntu 16.04 LTS Python: 2.7.12 shutit: 1.0.118

The funny thing is that if I put apostrophe's (") before and after the values in the prompt then no error is thrown. Are you familiar with this issue?

ianmiell commented 6 years ago

Thank you for letting me know about this.

I am not aware of it, but will look at it asap.

Beyond this - do you have a specific use case for ShutIt I can help more broadly with?

On Tue, Jun 12, 2018 at 1:07 PM, Ricardo Gaviria notifications@github.com wrote:

Hi There,

I am trying to run shutit skeleton and am faced with the following error when pressing enter to confirm the project directory:

/home/unitelabs/projects/shutitskel_feeder Traceback (most recent call last): File "/home/unitelabs/.virtualenvs/idorsia/bin/shutit", line 11, in sys.exit(main()) File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit.py", line 72, in main shutit.setup_shutit_obj() File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit_class.py", line 4126, in setup_shutit_obj self.parse_args() File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit_class.py", line 3757, in parse_args vagrant_image_name=args.vagrant_image_name)) File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit_class.py", line 3260, in process_args self.handle_skeleton(args) File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit_class.py", line 3370, in handle_skeleton module_directory = shutit_util.util_raw_input(prompt='\n>> ', default=default_dir) File "/home/unitelabs/.virtualenvs/idorsia/local/lib/python2.7/site-packages/shutit_util.py", line 258, in util_raw_input return input(prompt).strip() or default File "", line 1 /home/unitelabs/projects/shutitskel_feeder ^ SyntaxError: invalid syntax

OS: Ubuntu 16.04 LTS Python: 2.7.12 shutit: 1.0.118

The funny thing is that if I put apostrophe's (") before and after the values in the prompt then no error is thrown. Are you familiar with this issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ianmiell/shutit/issues/319, or mute the thread https://github.com/notifications/unsubscribe-auth/AGrczVqMz1hoLoc57_eHdUDHDehMTKi9ks5t768agaJpZM4UkTgH .

gaviriar commented 6 years ago

Thanks for your quick reply! If you need more info let me know to see if we can reproduce on your end.

Well, I'm glad you asked the latter question actually. :) As a matter of fact I do have a specific use case that I want to validate shutit for. For example, I am currently working on a project where I need to do deployments out to multiple machines in a network. I have been facilitating the process using a combination of bash, ssh, and rsync, but it can get pretty messy pretty quickly and hard to modularize the deployment process to make it reusable.

I wanted to test out shutit as a possible tool to help me with our deployment process. Given the information I have just provided what do you think? Would shutit be the right tool for the job?

ianmiell commented 6 years ago

I am biased, but yes, this is exactly the tool I'd use for such a job.

If you're looking for alternatives, then ansible is probably the best for what you want to do. A more radical solution would use something like a full-blown chef infrastructure, but that has benefits for much much bigger enterprise-level challenges.

I built shutit specifically for those cases where people need to automate what are basically bash scripts, and to reduce the difficulty of learning how to contribute to it (ansible is a bit complex for these simpler tasks).

Also, have you seen this? It could get you going without the need for 'shutit skeleton'

https://learnxinyminutes.com/docs/shutit/

On Tue, Jun 12, 2018 at 1:17 PM, Ricardo Gaviria notifications@github.com wrote:

Thanks for your quick reply! If you need more info let me know to see if we can reproduce on your end.

Well, I'm glad you asked the latter question actually. :) As a matter of fact I do have a specific use case that I want to validate shutit for. For example, I am currently working on a project where I need to do deployments out to multiple machines in a network. I have been facilitating the process using a combination of bash, ssh, and rsync, but it can get pretty messy pretty quickly and hard to modularize the deployment process to make it reusable.

I wanted to test out shutit as a possible tool to help me with our deployment process. Given the information I have just provided what do you think? Would shutit be the right tool for the job?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ianmiell/shutit/issues/319#issuecomment-396568540, or mute the thread https://github.com/notifications/unsubscribe-auth/AGrczQrhGrgqAkKLaxSjqNpvMyUnEohpks5t77FKgaJpZM4UkTgH .

ianmiell commented 6 years ago

I've pushed a fix for your skeleton problem, if you upgrade shutit it should get past that now. There's another problem with the output before 'bash' I need to look at, but I'll fix that quickly enough too.

You probably want to pick 'bash' second anyway.

On Tue, Jun 12, 2018 at 1:23 PM, Ian Miell ian.miell@gmail.com wrote:

I am biased, but yes, this is exactly the tool I'd use for such a job.

If you're looking for alternatives, then ansible is probably the best for what you want to do. A more radical solution would use something like a full-blown chef infrastructure, but that has benefits for much much bigger enterprise-level challenges.

I built shutit specifically for those cases where people need to automate what are basically bash scripts, and to reduce the difficulty of learning how to contribute to it (ansible is a bit complex for these simpler tasks).

Also, have you seen this? It could get you going without the need for 'shutit skeleton'

https://learnxinyminutes.com/docs/shutit/

On Tue, Jun 12, 2018 at 1:17 PM, Ricardo Gaviria <notifications@github.com

wrote:

Thanks for your quick reply! If you need more info let me know to see if we can reproduce on your end.

Well, I'm glad you asked the latter question actually. :) As a matter of fact I do have a specific use case that I want to validate shutit for. For example, I am currently working on a project where I need to do deployments out to multiple machines in a network. I have been facilitating the process using a combination of bash, ssh, and rsync, but it can get pretty messy pretty quickly and hard to modularize the deployment process to make it reusable.

I wanted to test out shutit as a possible tool to help me with our deployment process. Given the information I have just provided what do you think? Would shutit be the right tool for the job?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ianmiell/shutit/issues/319#issuecomment-396568540, or mute the thread https://github.com/notifications/unsubscribe-auth/AGrczQrhGrgqAkKLaxSjqNpvMyUnEohpks5t77FKgaJpZM4UkTgH .

ianmiell commented 6 years ago

Fixed the other problem too.

On Tue, Jun 12, 2018 at 1:28 PM, Ian Miell ian.miell@gmail.com wrote:

I've pushed a fix for your skeleton problem, if you upgrade shutit it should get past that now. There's another problem with the output before 'bash' I need to look at, but I'll fix that quickly enough too.

You probably want to pick 'bash' second anyway.

On Tue, Jun 12, 2018 at 1:23 PM, Ian Miell ian.miell@gmail.com wrote:

I am biased, but yes, this is exactly the tool I'd use for such a job.

If you're looking for alternatives, then ansible is probably the best for what you want to do. A more radical solution would use something like a full-blown chef infrastructure, but that has benefits for much much bigger enterprise-level challenges.

I built shutit specifically for those cases where people need to automate what are basically bash scripts, and to reduce the difficulty of learning how to contribute to it (ansible is a bit complex for these simpler tasks).

Also, have you seen this? It could get you going without the need for 'shutit skeleton'

https://learnxinyminutes.com/docs/shutit/

On Tue, Jun 12, 2018 at 1:17 PM, Ricardo Gaviria < notifications@github.com> wrote:

Thanks for your quick reply! If you need more info let me know to see if we can reproduce on your end.

Well, I'm glad you asked the latter question actually. :) As a matter of fact I do have a specific use case that I want to validate shutit for. For example, I am currently working on a project where I need to do deployments out to multiple machines in a network. I have been facilitating the process using a combination of bash, ssh, and rsync, but it can get pretty messy pretty quickly and hard to modularize the deployment process to make it reusable.

I wanted to test out shutit as a possible tool to help me with our deployment process. Given the information I have just provided what do you think? Would shutit be the right tool for the job?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ianmiell/shutit/issues/319#issuecomment-396568540, or mute the thread https://github.com/notifications/unsubscribe-auth/AGrczQrhGrgqAkKLaxSjqNpvMyUnEohpks5t77FKgaJpZM4UkTgH .

ianmiell commented 6 years ago

OK, am closing this one - if you have any suggestions for improvements or problems at all, please do raise more tickets.

gaviriar commented 6 years ago

Awesome! thanks @ianmiell for the swift response, I appreciate it!

I can understand you think you might be biased, but I have to say I agree with you, shutit is likely the tool for me. I will take a look at the link you shared which is exactly what I was looking for. Thanks!