ptwobrussell / Mining-the-Social-Web-2nd-Edition

The official online compendium for Mining the Social Web, 2nd Edition (O'Reilly, 2013)
http://bit.ly/135dHfs
Other
2.9k stars 1.49k forks source link

Possible link down #293

Open polarbearskill opened 8 years ago

polarbearskill commented 8 years ago

Hello,

I'm getting the following error when trying to vagrant up (output pasted at the bottom).

I believe this error is being caused because the following link isn't https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 working anymore? I tried to put it manually into my web browser but got a 404 link down error.

I've traced the code back to the \deploy\cookbooks\mtsw2e\recipes\default file. Which has the following code:

packages = [

Matplotlib won't install any other way right now unless you install numpy first.

http://stackoverflow.com/q/11797688

"numpy==1.7.1",

Install FuXi per https://code.google.com/p/fuxi/wiki/Installation_Testing

"http://cheeseshop.python.org/packages/source/p/pyparsing/pyparsing-1.5.5.tar.gz", "https://fuxi.googlecode.com/hg/layercake-python.tar.bz2", "https://pypi.python.org/packages/source/F/FuXi/FuXi-1.4.1.production.tar.gz", ]

****start my output *******

default: [2016-05-16T18:11:55+00:00] ERROR: python_pip[https://fuxi.googlecode.com/hg/layercake-python.tar.bz2](mts e::default line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but receive '1' default: ---- Begin output of pip install https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 ---- default: STDOUT: Collecting https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 default: STDERR: /usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIM singWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available o this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. ou can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/e latest/security.html#snimissingwarning. default: SNIMissingWarning default: /usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlat rmWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may ause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. default: InsecurePlatformWarning default: HTTP error 404 while getting https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 default: Could not install requirement https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 because of error 40 Client Error: Not Found for url: https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 default: Could not install requirement https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 because of HTTP error 04 Client Error: Not Found for url: https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 for URL https://fuxi.googl ode.com/hg/layercake-python.tar.bz2 default: ---- End output of pip install https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 ---- default: Ran pip install https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 returned 1 default: [2016-05-16T18:11:55+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessf ly (exit code 1) ef never successfully completed! Any errors should be visible in the tput above. Please fix your recipes so that they properly complete.

Minyall commented 8 years ago

I have the same issue and I'm trying to follow it up at the moment. As far as I can tell at the moment the key issue is

InsecurePlat rmWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may ause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.

which leads to https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning The version of python in the Vagrant box is pre-2.7.9 so we need to upgrade it.

evaristoc commented 8 years ago

@Minyall and all: Next upgrade is 3.x and it is very different (no backward compatibility...). It could be other reason rather related to urllib3, instead. I haven't tried the vragant though.

bdschaap commented 8 years ago

Are there any suggestions on how to resolve this issue in the meantime? I tried upgrading to Python 2.7.10 but receive a different error. I'm reading the book and would like to follow along with the examples.

==> default: * execute[install-pip] action run[2016-06-01T17:42:23+00:00] INFO: Processing execute[install-pip] action run (python::pip line 56) ==> default: (skipped due to not_if) ==> default: [2016-06-01T17:42:23+00:00] DEBUG: Skipping execute[install-pip] due to not_if ruby block ==> default: Recipe: python::virtualenv ==> default: * python_pip[virtualenv] action install ==> default: [2016-06-01T17:42:23+00:00] INFO: Processing python_pip[virtualenv] action install (python::virtualenv line 23) ==> default: [2016-06-01T17:42:23+00:00] DEBUG: Providers for generic python_pip resource enabled on node include: [LWRP provider python_pip from cookbook python] ==> default: [2016-06-01T17:42:23+00:00] DEBUG: Provider for action install on resource python_pip[virtualenv] is LWRP provider python_pip from cookbook python ==> default: [2016-06-01T17:42:23+00:00] INFO: Installing python_pip[virtualenv] version latest ==> default: ==> default:
==> default: ================================================================================ ==> default: Error executing action install on resource 'python_pip[virtualenv]' ==> default: ================================================================================ ==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed ==> default: ------------------------------------ ==> default: Expected process to exit with [0], but received '1' ==> default: ---- Begin output of pip install virtualenv ---- ==> default: STDOUT: ==> default: STDERR: Traceback (most recent call last): ==> default: File "/usr/local/bin/pip", line 7, in ==> default: from pip import main ==> default: ImportError: No module named pip ==> default: ---- End output of pip install virtualenv ---- ==> default: Ran pip install virtualenv returned 1 ==> default:
==> default: Cookbook Trace: ==> default: --------------- ==> default: /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/providers/pip.rb:155:in pip_cmd' ==> default: /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/providers/pip.rb:139:ininstall_package' ==> default: /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/providers/pip.rb:46:in block (2 levels) in class_from_file' ==> default: /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/providers/pip.rb:44:inblock in class_from_file' ==> default:
==> default: Resource Declaration: ==> default: --------------------- ==> default: # In /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/recipes/virtualenv.rb ==> default:
==> default: 23: python_pip "virtualenv" do ==> default: 24: action :install ==> default: 25: end ==> default:
==> default: Compiled Resource: ==> default: ------------------ ==> default: # Declared in /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/recipes/virtualenv.rb:23:in `from_file' ==> default:
==> default: python_pip("virtualenv") do ==> default: action [:install] ==> default: retries 0 ==> default: retry_delay 2 ==> default: default_guard_interpreter :default ==> default: declared_type :python_pip ==> default: cookbook_name :python ==> default: recipe_name "virtualenv" ==> default: package_name "virtualenv" ==> default: end ==> default:
==> default: Platform: ==> default: --------- ==> default: x86_64-linux ==> default:
==> default: [2016-06-01T17:42:23+00:00] INFO: Running queued delayed notifications before re-raising exception ==> default: [2016-06-01T17:42:23+00:00] DEBUG: Re-raising exception: Mixlib::ShellOut::ShellCommandFailed - python_pip[virtualenv](python::virtualenv line 23) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' ==> default: ---- Begin output of pip install virtualenv ---- ==> default: STDOUT: ==> default: STDERR: Traceback (most recent call last): ==> default: File "/usr/local/bin/pip", line 7, in ==> default: from pip import main ==> default: ImportError: No module named pip ==> default: ---- End output of pip install virtualenv ---- ==> default: Ran pip install virtualenv returned 1

alvanson commented 8 years ago

A few things have changed since the author was last seen in these parts. As of today (June 18, 2016), the following needs to be done to get vagrant up to run successfully:

    chef.channel = "stable"
    chef.version = "12.10.24"
default['python']['pip_script_url'] = 'https://bootstrap.pypa.io/get-pip.py'

Google Code is now in archive mode, so the direct link to layercake-python.tar.bz2 no longer works. To work around the issue:

  "/vagrant/layercake-python.tar.bz2",

I was able to successfully run vagrant up after completing the above.

polarbearskill commented 8 years ago

Perfect, that solved the problem.

carlosfrank commented 8 years ago

I have done the same but I could not be connected to the localhost. Any idea?

chimere commented 8 years ago

Now Mixlib has issues and python thinks layercake-python.tar.bz2 is not a file. I was following@alvanson solution. Using OS X El Capitan 10.11.5 and Vagrant 1.8.2

==> default: [2016-07-07T17:40:20+00:00] ERROR: python_pip[/fuxi/layercake-python.tar.bz2](mtsw2e::default line 52) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2' ==> default: ---- Begin output of pip install /fuxi/layercake-python.tar.bz2 ---- ==> default: STDOUT: Processing /fuxi/layercake-python.tar.bz2 ==> default: STDERR: Requirement '/fuxi/layercake-python.tar.bz2' looks like a filename, but the file does not exist ==> default: Exception: ==> default: Traceback (most recent call last): ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main ==> default: status = self.run(options, args) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 310, in run ==> default: wb.build(autobuilding=True) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 750, in build ==> default: self.requirement_set.prepare_files(self.finder) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 370, in prepare_files ==> default: ignore_dependencies=self.ignore_dependencies)) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 587, in _prepare_file ==> default: session=self.session, hashes=hashes) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 798, in unpack_url ==> default: unpack_file_url(link, location, download_dir, hashes=hashes) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 705, in unpack_file_url ==> default: unpack_file(from_path, location, content_type, link) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/utils/init.py", line 602, in unpack_file ==> default: tarfile.is_tarfile(filename) or ==> default: File "/usr/lib/python2.7/tarfile.py", line 2583, in is_tarfile ==> default: t = open(name) ==> default: File "/usr/lib/python2.7/tarfile.py", line 1660, in open ==> default: return func(name, "r", fileobj, **kwargs) ==> default: File "/usr/lib/python2.7/tarfile.py", line 1722, in gzopen ==> default: fileobj = bltn_open(name, mode + "b") ==> default: IOError: [Errno 2] No such file or directory: '/fuxi/layercake-python.tar.bz2' ==> default: ---- End output of pip install /fuxi/layercake-python.tar.bz2 ---- ==> default: Ran pip install /fuxi/layercake-python.tar.bz2 returned 2 ==> default: [2016-07-07T17:40:20+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.

uid99 commented 7 years ago

Any further help on this topic? I am getting the same error and used the solution provided above by alvanson, to no avail

alvanson commented 7 years ago

If you're following my instructions above, layercake-python.tar.bz2 needs to be in the top-level directory containing Vagrantfile, _not_ in a separate fuxi directory.