Failed to create a project - tag name expected
See original GitHub issue🐛 Bug Report
I failed to create a project using the cookie cutter, tried several times, and got the same error:
Traceback (most recent call last):
File "/home/peter/.local/bin/cookiecutter", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/peter/.local/lib/python3.8/site-packages/cookiecutter/cli.py", line 140, in main
cookiecutter(
File "/home/peter/.local/lib/python3.8/site-packages/cookiecutter/main.py", line 101, in cookiecutter
result = generate_files(
File "/home/peter/.local/lib/python3.8/site-packages/cookiecutter/generate.py", line 352, in generate_files
generate_file(
File "/home/peter/.local/lib/python3.8/site-packages/cookiecutter/generate.py", line 169, in generate_file
tmpl = env.get_template(infile_fwd_slashes)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 830, in get_template
return self._load_template(name, self.make_globals(globals))
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 804, in _load_template
template = self.loader.load(self, name, globals)
File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 125, in load
code = environment.compile(source, name, filename)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 591, in compile
self.handle_exception(exc_info, source_hint=source_hint)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "./pyproject.toml", line 45, in <module>
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 497, in _parse
return Parser(self, source, name, encode_filename(filename)).parse()
File "/usr/lib/python3/dist-packages/jinja2/parser.py", line 901, in parse
result = nodes.Template(self.subparse(), lineno=1)
File "/usr/lib/python3/dist-packages/jinja2/parser.py", line 883, in subparse
rv = self.parse_statement()
File "/usr/lib/python3/dist-packages/jinja2/parser.py", line 125, in parse_statement
self.fail('tag name expected', token.lineno)
File "/usr/lib/python3/dist-packages/jinja2/parser.py", line 59, in fail
raise exc(msg, lineno, self.name, self.filename)
jinja2.exceptions.TemplateSyntaxError: tag name expected
File "./pyproject.toml", line 45
{%+ if cookiecutter.create_example_template == 'cli' %}
🔬 How To Reproduce
- Run cookiecutter
gh:TezRomacH/python-package-template --checkout v1.1.0
- Then select:
- You’ve downloaded /home/peter/.cookiecutters/python-package-template before. Is it okay to delete and re-download it? [yes]: (yes)
- project_name [python-project]: flac-converter
- project_description [Awesome
flac-converter
is a Python cli/package created with https://github.com/TezRomacH/python-package-template]: (default) - organization [flac-converter]: pksol
- license: default MIT
- minimal_python_version: - 3.7
- github_name [pksol]: (default)
- email [hello@pksol.com]: kogan.peter@gmail.com
- version [0.1.0]: (default)
- line_length [88]: (default)
- create cli (default)
- Then the above exception happens
Environment
- OS: Linux - Ubuntu
- Python version: 3.8.10
📈 Expected behavior
The project is created.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Flask Error extending html with template: jinja2.exceptions. ...
python - Flask Error extending html with template: jinja2. exceptions. TemplateSyntaxError: tag name expected - Stack Overflow. Stack Overflow for Teams – ......
Read more >"SaltRenderError: Jinja syntax error: tag name expected ...
It seems like the rendering of the file fails because there's Jinja characters in that section. If i escape the % , {...
Read more >jinja2.exceptions.TemplateSyntaxError: tag name expected
I got this error after added all the code to the layout.html file. I still get the error even when I comment out...
Read more >Importing XML - 'Expected Tag' Error on Project:Support desk
My import tool says "Import failed: Expected tag, got #comment." Yes, the .XML is UTF-8 and I didn't modify it.
Read more >In Xamarin Forms Android run, what is this "error APT1000
In Xamarin Forms Android run, what is this "error APT1000: Found tag id where item is expected"? I am getting this error in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tried to uninstall and then reinstalled cookie-cutter, got the same result.
I’m glad it ended successfully!