-1

I installed cookiecutter using

`conda install cookiecutter` 

but when I try to import the repo from git hub using

`cookiecutter https://github.com/drivendata/cookiecutter-data-science`

I got the following error message:

{

Traceback (most recent call last):
File "C:\Users\iamuraptha\Anaconda3\Scripts\cookiecutter-script.py", line 5, in <module>
    sys.exit(cookiecutter.cli.main())
  File "C:\Users\iamuraptha\Anaconda3\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\iamuraptha\Anaconda3\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "C:\Users\iamuraptha\Anaconda3\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\iamuraptha\Anaconda3\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\iamuraptha\Anaconda3\lib\site-packages\cookiecutter\cli.py", line 120, in main
    password=os.environ.get('COOKIECUTTER_REPO_PASSWORD')
  File "C:\Users\iamuraptha\Anaconda3\lib\site-packages\cookiecutter\main.py", line 63, in cookiecutter
    password=password
  File "C:\Users\iamuraptha\Anaconda3\lib\site-packages\cookiecutter\repository.py", line 103, in determine_repo_dir
    no_input=no_input,
  File "C:\Users\iamuraptha\Anaconda3\lib\site-packages\cookiecutter\vcs.py", line 99, in clone
    stderr=subprocess.STDOUT,
  File "C:\Users\iamuraptha\Anaconda3\lib\subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "C:\Users\iamuraptha\Anaconda3\lib\subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'clone', 'https://github.com/drivendata/cookiecutter-data-science']' returned non-zero exit status 128. 

}

avigil
  • 2,218
  • 11
  • 18
Aptha Gowda
  • 968
  • 2
  • 10
  • 20

4 Answers4

1

You need something git can clone. Use https://github.com/drivendata/cookiecutter-data-science.git (this is the link you get when you click the 'clone or download' button in Github)

avigil
  • 2,218
  • 11
  • 18
  • 1
    when you type `git clone https://github.com/drivendata/cookiecutter-data-science.git` in a terminal what happens? (It should create a folder called cookiecutter-data-science and download the contents of that repo) – avigil Mar 24 '18 at 19:26
  • `Cloning into 'cookiecutter-data-science'... fatal: unable to access 'https://github.com/drivendata/cookiecutter-data-science.git/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version` – Aptha Gowda Mar 24 '18 at 19:30
  • 1
    well thats your issue. Don't use the OS X system provided libraries- they are horribly out of date. See https://stackoverflow.com/questions/44316292/ssl-sslerror-tlsv1-alert-protocol-version to fix it by using a virtualenv. You could also use homebrew to install updated version of OpenSSL – avigil Mar 24 '18 at 19:40
1

I just wanted to add a clarification for people coming here because they have a somewhat similar problem. The problem is not that the address isn't a valid git link. You can give cookiecutter a regular URL to a github repo and it will work, provided the directory in which cookiecooker is installed is in your environment's path. I'm not on Windows so I can't confirm, but check the documentation for more details about adjusting the path. And remember to factor Anaconda in if you are using it instead of the system Python.

For me this was a straightforward process on a Mac because I followed the prompt when I installed Anaconda, but I needed to add the path manually on Ubuntu machine

JoeF
  • 733
  • 1
  • 7
  • 21
0

I installed the package like you did above:

conda install cookiecutter

Waited until the installation happened and then used:

cookiecutter https://github.com/drivendata/cookiecutter-data-science

I got the following output

project_name [project_name]: Fred
repo_name [Fred]: Fred
author_name [Your name (or your organization/company/team)]: Joseph 
Cunningham
description [A short description of the project.]: test
Select open_source_license:
1 - MIT
2 - BSD-3-Clause
3 - No license file
Choose from 1, 2, 3 [1]: 3
s3_bucket [[OPTIONAL] your-bucket-for-syncing-data (do not include 
's3://')]: 
aws_profile [default]: 
Select python_interpreter:
1 - python
2 - python3
Choose from 1, 2 [1]: 2

The people above are saying it is not a valid git but it worked for me.

Jay
  • 75
  • 1
  • 9
0

I was behind a corporate firewall which prevented me from using

'cookiecutter https://github.com/drivendata/cookiecutter-data-science' 

This may be an issue for someone else who lands up here.

Pelonomi Moiloa
  • 516
  • 5
  • 12