Spaces in categories' names

Hello,
When I put in the front matter two categories like:

categories:

  • category1 with spaces
  • category2

Hugo says my category template is “an incomplete or empty template”.
When I put only one category, like this:

categories:

  • category1 with spaces

It works.

Try

- "category1 with spaces"

Already tried, it’s the same. Also tried with toml.

I’m using tranquilpeak theme and hugo 1.8

Edit (sorry) : in JSON too it shows an error.

@Abdarrahmaan did you try the following?

categories: ["category1 with spaces", "category2"]

Same error.

@Abdarrahmaan Can you point me to a repo? I wonder if you’re doing something wrong in the templating? For example, referencing a single value rather than a range.

Repo of the theme:

The template mentionned in the error message is:

The cause was this :

(replace .category.path " " “/”))