PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Failed to Create `cookiecutter-data-science` Template in Cookiecutter

Open StellaHuang95 opened this issue 1 year ago • 1 comments

Describe the bug [A clear and concise description of the bug]

Steps to Reproduce

  1. Open Cookiecutter, pick cookiecutter-data-science
  2. Wait for it to create template
  3. Click Create and Open Folder

The following error occurs:

----- Creating files using template 'cookiecutter-data-science' -----
Traceback (most recent call last):
  File "c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\cookiecutter\cookiecutter_run.py", line 22, in <module>
    from cookiecutter.main import cookiecutter
  File "C:\Users\stellahuang\AppData\Local\Microsoft\CookiecutterTools\env\Lib\site-packages\cookiecutter\main.py", line 33, in <module>
    REPO_REGEX = re.compile(r"""
    (?x)
    ...<3 lines>...
    )
    """)
  File "C:\Users\stellahuang\AppData\Local\Programs\Python\Python313\Lib\re\__init__.py", line 289, in compile
    return _compile(pattern, flags)
  File "C:\Users\stellahuang\AppData\Local\Programs\Python\Python313\Lib\re\__init__.py", line 350, in _compile
    p = _compiler.compile(pattern, flags)
  File "C:\Users\stellahuang\AppData\Local\Programs\Python\Python313\Lib\re\_compiler.py", line 748, in compile
    p = _parser.parse(p, flags)
  File "C:\Users\stellahuang\AppData\Local\Programs\Python\Python313\Lib\re\_parser.py", line 980, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
  File "C:\Users\stellahuang\AppData\Local\Programs\Python\Python313\Lib\re\_parser.py", line 459, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
                ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                       not nested and not items))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\stellahuang\AppData\Local\Programs\Python\Python313\Lib\re\_parser.py", line 841, in _parse
    raise source.error('global flags not at the start '
                       'of the expression',
                       source.tell() - start)
re.PatternError: global flags not at the start of the expression at position 1 (line 2, column 1)
C:\Users\stellahuang\AppData\Local\Microsoft\CookiecutterTools\env\scripts\python.exe returned an exit code of 1.
----- Failed to create files using template 'cookiecutter-data-science' -----

StellaHuang95 avatar Feb 03 '25 21:02 StellaHuang95

maybe our command is deprecated? "{"cookiecutter": {"DEPRECATED": "Use of the cookiecutter command is deprecated. Please use ccds in place of cookiecutter. To continue using the deprecated template, use cookiecutter ... -c v1."}} "

is this the project?

Image

bschnurr avatar May 12 '25 18:05 bschnurr