[Tex/LaTex] pdflatex.EXE: Not enough room in an internal buffer

compilingexternal filesgraphics

I've got a (hopefully) trivial problem. I have a python script that is generating the a .tex file for over 600 figures. The code automatically groups figures in up to 4 subplots depending on some parameters. I ran a brief test script with a reduced number of figures and everything went fine. Then, when running the entire batch of images I get the error:

geometry driver: auto-detecting
geometry detected driver: pdftex [1{C:/Users/ln/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
("P:…\Appendix_A.lof") [1] [1]pdflatex.EXE:
Not enough room in an internal buffer. texify: pdflatex failed for
some reason (see log file).

The log file is useless and has the same info. The script gets the error in the code below:

\begin{figure}[ht]
\subcapcentertrue
\centering
    \subfigure[Comparison of percentile concentrations at Location ID 13]{%
        \includegraphics[width=0.45\linewidth]{"Biochemical Oxygen Demand 5 Day Un-Diluted_mgL_Percent Saturation Field Dissolved Oxygen_perSAT_13_pp.png"}
        \label{fig:subfigure}}
    \quad
%
\caption{QQ plots comparing Biochemical Oxygen Demand 5 Day Un-Diluted, mg/L, and Percent Saturation Field Dissolved Oxygen, perSAT.}
\label{fig:figure}
\end{figure}
\clearpage

If I change the includegraphics line to something shorter, like:

\includegraphics[width=0.45\linewidth]{Alkalinity as CaCO3_mgL_pH_pH Units_13_pp.png}

Everything runs fine. I'm starting the file path at C:, so this shouldn't be a windows file path length error. Is there a limitation on the length of an image name in LaTeX that I don't know about? I would ideally like to not regenerate the figures using a different naming convention.

Cheers

Best Answer

I resolved the issue by changing the file names of the images so that they are sorter and without spaces. I believe this is a bug.