jupyterlab/extension-cookiecutter-ts

Can't initialize cookiecutter or clone the git repo on Windows

dmedv opened this issue ยท 3 comments

dmedv commented

Description

The repository contains a path that is invalid on Windows.

Reproduce

  1. Run cookiecutter https://github.com/jupyterlab/extension-cookiecutter-ts
  2. See error Command '['git', 'clone', 'https://github.com/jupyterlab/extension-cookiecutter-ts']' returned non-zero exit status 128.
  3. Run git clone https://github.com/jupyterlab/extension-cookiecutter-ts
  4. See error invalid path '{{cookiecutter.python_name}}/jupyter-config/nb-config/{{cookiecutter.python_name | replace('-', '_')}}.json'

Expected behavior

Context

  • Operating System and version: Windows 10
  • Browser and version:
  • JupyterLab version:
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! ๐Ÿค—

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! ๐Ÿ‘‹

Welcome to the Jupyter community! ๐ŸŽ‰

Thanks for reporting the issue @dmedv

To fix the problem a good solution would be to use hidden template variable prefixed with __:

https://github.com/cookiecutter/cookiecutter/blob/52dd18513bbab7f0fbfcb2938c9644d9092247cf/cookiecutter/prompt.py#L187

Actually the __ feature is not available on the stable version ๐Ÿ˜ž