Problem with listing numbering in caption

When I want to put a simple caption to my listing, tex puts the number of the subheading to the listing and not the actual listing number.

\begin{lstlisting}[language=Python, caption=Listing 1: caption, captionpos=b]
some code
\end{lstlisting}


As you see here, it also adds the chapter number instead of only listing 1.

• Welcome to TeX.SE. Please reveal which document class you employ. – Mico May 2 at 12:20

listings offers the numberbychapter option which is initially set to true. Using \lstset{numberbychapter=false} you can make sure, listings are numbered continuously throughout the document without the chapter number prefix:

\documentclass{report}
\usepackage{listings}
\lstset{numberbychapter=false}
\begin{document}
\chapter{chapter}

\begin{lstlisting}[language=Python, caption=caption, captionpos=b]
some code
\end{lstlisting}
\end{document}