# name.bb appears above picture when using includegraphics

I've tried adding a picture using:

\begin{figure}[htb]
\centering
\textbf{bbb}\par\medskip
\includegraphics[width=\textwidth]{schematOgolny.png}
\captionof{figure}{sth}
\label{aaa}
\end{figure}


In the result I've got this:

XeLaTeX added text schematOgolny.bb above the picture. This does not however happens when I use PDFLaTeX

I'm a bit hesitant towards using PDFLaTeX because for some reason utf8 is not supported (and I need utf8).

My question is how can I get rid of that extra text in XeLaTeX?

SOLUTION:

I had defined \graphicspath for graphicx library, which caused the issue. Thanks for @Teepeemm for pointing me in the right direction

EDIT:

This is minimal reproducable example:

\documentclass{article}
\usepackage{graphicx}
\usepackage{capt-of}
% Problematic line (path does not need to actually exist):
\graphicspath{ { C:/sth/PracInż/obrazy/ } }
\begin{document}
\begin{figure}[htb]
\centering
\textbf{bbb}\par\medskip
\includegraphics[width=\textwidth]{schematOgolny.png}
% Any picture will do
\captionof{figure}{sth}
\label{aaa}
\end{figure}
\end{document}

• I'm skeptical that this would actually happen. If you have a file that has only \documentclass{article}\usepackage{graphicx}\begin{document} and then your posted code and then \end{document}, do you still have the .bb occur? – Teepeemm Dec 1 '18 at 19:05
• Could you show us your .log file? – book Dec 1 '18 at 19:13
• without any example code it is hard to guess but I would suspect an incorrect option to the graphics package – David Carlisle Dec 1 '18 at 19:13
• @Miku your \graphicspath had a space in it I would guess? So the error is in code that you did not show so only you can answer the question. – David Carlisle Dec 1 '18 at 21:16

C:/sth/PracInż/obrazy/ schematOgolny.png

\graphicspath{ {C:/sth/PracInż/obrazy/} }
`