When using the titlesec package to modify the layout of the chapter title, I get the error: Missing number, treated as zero., in the section title.
I use the following code to perform this action:
\usepackage{titlesec, blindtext, color}
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}
throwing error in the first section within the first chapter.
The only way I have found to avoid generating an error is to remove this design. But I require to place this.

