[Tex/LaTex] Error: ‘I can’t write on file ‘Main.pdf’

errorspreamble

I suddenly keep getting the error message in the title. I have no idea what I did wrong as I did not have this problem before. I know this error can occur if the corresponding pdf file is opened, but this is not the case.

When I run biber I get the error: 'Entity: line 1959: parser error : expected '>'

Any ideas on how this can be solved? My preamable is the following:

\PassOptionsToPackage{table,xcdraw}{xcolor}
\documentclass[a4paper,12pt]{report}
\newcommand{\argmin}{\arg\!\min}
\usepackage[backend=biber, natbib=true, maxcitenames = 2, style=authoryear, uniquename=false]{biblatex}
\usepackage{algorithm}
\usepackage{caption}
\usepackage{amsmath,amsfonts}
\usepackage{smartdiagram}
\usepackage{float}
\smartdiagramset{circular distance=4cm,
font=\normalsize,
text width=2.5cm,
arrow line width=0.2cm
}
\newsavebox{\mybox}
\savebox{\mybox}{%
\smartdiagram[circular diagram]{Insured \\ policy holder,Insurer \\ company}
}

\addbibresource{bib/literature.bib}

\begin{document}[a4paper,12pt]

Best Answer

Since you didn't give more details about the problem (like what compiler are you using), it is hard to found out what is the problem. However, I have reorganized your code, maybe it solves your problem:

\documentclass[a4paper,12pt]{report}
\usepackage[table,xcdraw]{xcolor}
\usepackage[backend=biber, natbib=true, maxcitenames = 2, style=authoryear, uniquename=false]{biblatex}
\usepackage{algorithm}
\usepackage{caption}
\usepackage{amsmath,amsfonts}
\usepackage{smartdiagram}
\usepackage{float}
\newcommand{\argmin}{\arg\!\min}
\smartdiagramset{circular distance=4cm,
font=\normalsize,
text width=2.5cm,
arrow line width=0.2cm
}
\newsavebox{\mybox}
\savebox{\mybox}{%
\smartdiagram[circular diagram]{Insured \\ policy holder,Insurer \\ company}
}

\addbibresource{bib/literature.bib}

\begin{document}

your text

\printbibliography

\end{document}
Related Question