-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Virtual Machine installation failed: Chef run process exited unsuccessfully (exit code 1) because of undefined method 'python' #325
Comments
I have exactly the same error:
During the processing of the command
All these messages above appear before
|
With the current version of Chef (13.x), Chef will not tolerate some form of syntax. This lead to the compile errors in the skripts. As a quick fix force vagrant to use an older version of Chef (12.9.x). Do so with adding the following: config.vm.provision :chef_solo do |chef|
chef.version = '12.19.36'
chef.json = ... See rreben/basket4py#1 for more details. |
Thank you for your prompt reply. `User ~/Mining-the-Social-Web-2nd-Edition (master)
User ~/Mining-the-Social-Web-2nd-Edition (master) |
Hm, I guess somehow you made a mistake in the vagrant file. Post your vagrant file here. You can also use the basket4py project, install this, copy the notebooks and insall twitter via pip. The procedure is in #317 |
Here is the content of my vagrant file. I can read in it that my -- mode: ruby --vi: set ft=ruby :########################################################################### This configuration file is the starting point for understanding how thevirtual machine is configured and provides a default provider that usesVirtualbox to provide virtualization. It also contains an experimentalprovider for using an AWS EC2 microinstance in the cloud. The AWS providerworks but is a bit bleeding edge and incomplete from the standpoint ofproviding all of the functionality that it should at this time, so it shouldonly be used by hackers who are comfortable working in the cloud. Afterfilling in the necessary AWS credentials below use the --provider=awsoption to use the AWS provider. See https://github.com/mitchellh/vagrant-awsfor more details.See http://docs.vagrantup.com/v2/vagrantfile/index.html for additionaldetails on Vagrantfile configuration in general.########################################################################### Vagrant.configure("2") do |config| SSH forwarding: See https://help.github.com/articles/using-ssh-agent-forwardingconfig.ssh.forward_agent = true ######################################################################### Virtualbox configuration - the default provider for running a local VM######################################################################### config.vm.provider :virtualbox do |vb, override|
end ######################################################################### AWS configuration - an experimental provider for running this VM in thecloud. See https://github.com/mitchellh/vagrant-aws for configurationdetails. User specific values for your own environment are referencedhere as MTSW_ environment variables that you could set (or hard code.)######################################################################### config.vm.provider :aws do |aws, override|
end Chef-Solo provisioningconfig.vm.provision :chef_solo do |chef| end |
Yes please try basket4py. The chef recipes in this https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition repo are completely outdated. Unfortunately there isn't any development in this repo, so I can't change them via pull request. ... |
Hello, I have exactly the same problem with basket4py. Following the instructions, I donwloaded the repo, I did a Needless to say I can't access to the Jupyter system and add the Twitter framework.
With the other two repos? It is maybe the source of my bad luck: before doing the basket4py stuff, I remember having cloned only one repo |
So basket4py is working now for you? |
No. |
That's too bad. The error message hints at the problem, that you are using chef 13.x (so are you sure you are using the vagrantfile from basket4py (not from Mining-the-Social-Web...) Please do a |
Okay. Thank you for your patience. |
Hello, I failed at installing the virtual machine. I thing it has to do with this
'undefined method 'python'
but I don't know how to solve this issue on my own since I know little about programming. Can someone please help me? I would be immensely grateful.PS: I followed every previous step carefully, and I'm using Windows 10, 64bit
=================================================================== ==> default: Recipe Compile Error in /var/chef/cache/cookbooks/python/attributes/default.rb ==> default: =================================================================== ==> default: ==> default: NoMethodError ==> default: ------------- ==> default: undefined method
python' for #Chef::Node::Attribute:0x00000003337a90==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /var/chef/cache/cookbooks/python/attributes/default.rb:23:in
from_file' ==> default: ==> default: Relevant File Content: ==> default: ---------------------- ==> default: /var/chef/cache/cookbooks/python/attributes/default.rb: ==> default: ==> default: 16: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ==> default: 17: # See the License for the specific language governing permissions and ==> default: 18: # limitations under the License. ==> default: 19: # ==> default: 20: ==> default: 21: default['python']['install_method'] = 'package' ==> default: 22: ==> default: 23>> if python['install_method'] == 'package' ==> default: 24: case platform ==> default: 25: when "smartos" ==> default: 26: default['python']['prefix_dir'] = '/opt/local' ==> default: 27: else ==> default: 28: default['python']['prefix_dir'] = '/usr' ==> default: 29: end ==> default: 30: else ==> default: 31: default['python']['prefix_dir'] = '/usr/local' ==> default: 32: end ==> default: System Info: ==> default: ------------ ==> default: chef_version=13.0.118 ==> default: platform=ubuntu ==> default: platform_version=12.04 ==> default: ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] ==> default: program_name=chef-solo worker: ppid=1299;start=14:36:10; ==> default: executable=/opt/chef/bin/chef-solo ==> default: [2017-05-25T14:36:26+00:00] DEBUG: Re-raising exception: NoMethodError - undefined method
python' for #Chef::Node::Attribute:0x00000003337a90==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/node.rb:267:in
public_send' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/node.rb:267:in
method_missing'==> default: /var/chef/cache/cookbooks/python/attributes/default.rb:23:in
from_file' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/mixin/from_file.rb:30:in
instance_eval'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/mixin/from_file.rb:30:in
from_file' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/dsl/include_attribute.rb:39:in
block in include_attribute'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/dsl/include_attribute.rb:31:in
each' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/dsl/include_attribute.rb:31:in
include_attribute'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:213:in
load_attribute_file' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:202:in
load_attributes_from_cookbook'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:132:in
block in compile_attributes' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:131:in
each'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:131:in
compile_attributes' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:74:in
compile'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context.rb:187:in
load' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/policy_builder/expand_node_object.rb:97:in
setup_run_context'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/client.rb:513:in
setup_run_context' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/client.rb:281:in
run'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:291:in
block in fork_chef_client' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:279:in
fork'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:279:in
fork_chef_client' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:244:in
block in run_chef_client'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/local_mode.rb:44:in
with_server_connectivity' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:232:in
run_chef_client'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/client.rb:464:in
sleep_then_run_chef_client' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/client.rb:451:in
block in interval_run_chef_client'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/client.rb:450:in
loop' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/client.rb:450:in
interval_run_chef_client'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/client.rb:434:in
run_application' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:59:in
run'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/solo.rb:225:in
run' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/bin/chef-solo:25:in
<top (required)>'==> default: /usr/bin/chef-solo:58:in
load' ==> default: /usr/bin/chef-solo:58:in
==> default:
==> default: Running handlers:
==> default: [2017-05-25T14:36:26+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: [2017-05-25T14:36:26+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 0 resources updated in 15 seconds
==> default: [2017-05-25T14:36:26+00:00] DEBUG: Server doesn't support resource history, skipping resource report.
==> default: [2017-05-25T14:36:26+00:00] DEBUG: Audit Reports are disabled. Skipping sending reports.
==> default: [2017-05-25T14:36:26+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2017-05-25T14:36:26+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> default: [2017-05-25T14:36:26+00:00] DEBUG: NoMethodError: undefined method
python' for #<Chef::Node::Attribute:0x00000003337a90> ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/node.rb:267:in
public_send'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/node.rb:267:in
method_missing' ==> default: /var/chef/cache/cookbooks/python/attributes/default.rb:23:in
from_file'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/mixin/from_file.rb:30:in
instance_eval' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/mixin/from_file.rb:30:in
from_file'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/dsl/include_attribute.rb:39:in
block in include_attribute' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/dsl/include_attribute.rb:31:in
each'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/dsl/include_attribute.rb:31:in
include_attribute' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:213:in
load_attribute_file'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:202:in
load_attributes_from_cookbook' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:132:in
block in compile_attributes'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:131:in
each' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:131:in
compile_attributes'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context/cookbook_compiler.rb:74:in
compile' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/run_context.rb:187:in
load'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/policy_builder/expand_node_object.rb:97:in
setup_run_context' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/client.rb:513:in
setup_run_context'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/client.rb:281:in
run' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:291:in
block in fork_chef_client'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:279:in
fork' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:279:in
fork_chef_client'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:244:in
block in run_chef_client' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/local_mode.rb:44:in
with_server_connectivity'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:232:in
run_chef_client' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/client.rb:464:in
sleep_then_run_chef_client'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/client.rb:451:in
block in interval_run_chef_client' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/client.rb:450:in
loop'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/client.rb:450:in
interval_run_chef_client' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/client.rb:434:in
run_application'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application.rb:59:in
run' ==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/application/solo.rb:225:in
run'==> default: /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/bin/chef-solo:25:in
<top (required)>' ==> default: /usr/bin/chef-solo:58:in
load'==> default: /usr/bin/chef-solo:58:in
<main>' ==> default: [2017-05-25T14:36:26+00:00] ERROR: undefined method
python' for #Chef::Node::Attribute:0x00000003337a90==> default: [2017-05-25T14:36:26+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
`
The text was updated successfully, but these errors were encountered: