Cookiecutter: A valid repository for X could not be found in the following locations:
Asked Answered
H

1

6

enter image description here

I'm working in win 10 with git bash and I want to create a scrapy spider from a cookiecutter template. I'm looking at https://cookiecutter.readthedocs.io/en/latest/overview.html and https://cookiecutter.readthedocs.io/en/latest/first_steps.html for guidance.

I have created a cookiecutter-spider directory and put my spider1 template in it.My cookiecutter.json file is in the tutorial directory and is as follows:

{
  "project_name": "Offical Project Name™",
  "description": "A short description of the project",
  "directory_name": "tutorial",
  "file_name": "test_spider",
  "project_name": "cookiecutter-spider",
}

when I run it at the command line:

$ cookiecutter /e/ENVS/r2/tutorial/cookiecutter-spider
A valid repository for "e:/ENVS/r2/tutorial/cookiecutter-spider" could not be found in the following locations:
e:/ENVS/r2/tutorial/cookiecutter-spider/
e:/ENVS/r2/tutorial/cookiecutter-spider/

How can I get this working?

Hebron answered 29/6, 2017 at 20:34 Comment(1)
This is not a valid json file (trailing comma).Flowing
H
8

The issue is that the json file 'cookiecutter' needed to be renamed to 'cookiecutter.json'

Hebron answered 1/7, 2017 at 17:49 Comment(1)
So, I randomly started running into this issue with a template that I had used in the past...and the cookiecutter.json file is appropriately named with the .json extension...any suggestions?Gramnegative

© 2022 - 2024 — McMap. All rights reserved.