[Tex/LaTex] Something’s wrong–perhaps a missing \item. \end{frame} Error

beamererrors

What is wrong here? I got an error:

Something's wrong--perhaps a missing \item. \end{frame}
\begin{document}

  \begin{frame}
    \maketitle
  \end{frame}

  \begin{frame}
    \begin{figure}[h!]
      \centering
      \includegraphics[width=0.8\textwidth,]{dane_zamkniecie.eps}
      \caption{Close prices from 1950-01-03 to 2013-12-05\\}
      \label{fig6}
    \end{figure}
  \end{frame}

\end{document}

Best Answer

There are two main solutions. The first one is given by @moewe in the comments.

The other is to load the caption package (\usepackage{caption}), which will get rid of the error. This is the best option if you want to add a break line in the caption (which was perhaps your original intention).

If you do not want to load another package and still want to add more space after the figure, I would suggest to use \vspace{} after the figure. This however works for one figure only. If you want to change the spacing for every figure, use the suggestion by @Fran, and set \belowcaptionskip. See more about it here.

Related Question