-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Description
I just tried to follow the instructions in the README and encountered errors.
copier
I entered:
uv tool install copier --with copier-templates-extensions
copier copy gh:scientific-python/cookie test-scipy-cookie --trust --vcs-ref=HEADThis installed copier (v. 9.5.0), then produced the following error:
Traceback (most recent call last):
File "/Users/jsd/.local/bin/copier", line 10, in <module>
sys.exit(copier_app_run())
^^^^^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/plumbum/cli/application.py", line 640, in run
inst, retcode = subapp.run(argv, exit=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/plumbum/cli/application.py", line 635, in run
retcode = inst.main(*tailargs)
^^^^^^^^^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/copier/cli.py", line 281, in main
return _handle_exceptions(inner)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/copier/cli.py", line 70, in _handle_exceptions
method()
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/copier/cli.py", line 272, in inner
with self._worker(
^^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/copier/main.py", line 254, in __exit__
raise value
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/copier/cli.py", line 279, in inner
worker.run_copy()
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/copier/main.py", line 950, in run_copy
self._ask()
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/copier/main.py", line 505, in _ask
system=self._system_render_context(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/copier/main.py", line 385, in _system_render_context
"answers_file": self.answers_relpath,
^^^^^^^^^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/copier/main.py", line 582, in answers_relpath
return Path(template.render(**self.answers.combined))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/jinja2/environment.py", line 1290, in render
ctx = self.new_context(dict(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/jinja2/environment.py", line 1388, in new_context
return new_context(
^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/jinja2/runtime.py", line 117, in new_context
return environment.context_class(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jsd/.local/share/uv/tools/copier/lib/python3.12/site-packages/copier_templates_extensions/extensions/context.py", line 23, in __init__
parent.update(extension_self.hook(parent))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/lp/_hycnw992kl1_s_4p43q52jc0000gn/T/copier.vcs.clone.f4s2or_l/helpers/extensions.py", line 10, in hook
KeyError: 'project_name'Cookiecutter
I entered:
uv tool install cookiecutter
cookiecutter gh:scientific-python/cookieThis worked as expected.
Cruft
I entered:
uv tool install cruft
cruft create gh:scientific-python/cookieThis installed cruft (v. 2.16.0), then produced the following error:
╭─ Error ──────────────────────────────────────────────────────────────────────╮
│ Unable to initialize the cookiecutter using gh:scientific-python/cookie! │
│ Failed to clone the repo. stderr: 'Cloning into │
│ '/var/folders/lp/_hycnw992kl1_s_4p43q52jc0000gn/T/tmpi3vm5nqm'... │
│ ssh: Could not resolve hostname gh: nodename nor servname provided, or not │
│ known │
│ fatal: Could not read from remote repository. │
│ │
│ Please make sure you have the correct access rights │
│ and the repository exists. │
│ ' │
╰──────────────────────────────────────────────────────────────────────────────╯
Full URL instead of gh
I also tried replacing the gh:scientific-python/cookie with https://github.com/scientific-python/cookie. This resolved the error with Cruft, but not with Copier.
Let me know if any other information would be useful.
Metadata
Metadata
Assignees
Labels
No labels