In my thesis I am using minted for listings and lots of short inline references.

I'm running TeXLive on Windows with python 3.6. I am also using the cache, kpsewhich and outputdir options:


The more inline minted usages I have, the more often I get a compiler error

76: I can't write on file `thesis.pyg'.
<to be read again> 
l.276 ...supposed to await a \protobufinline|QUIT|

When I turn minteds caching off, it seems to work fine, but compiling takes ages. I need kpeswitch as the document has several dependencies to other directories and I am building with some TEXINPUTS.

Also note, that the error position l.102 is just an example: it seemingly randomly occurs at different positions, mostly where mintedinline commands are used.

I suppose it makes little sense to give a minimal example, as the problem only occurs in the huge document and the frequency is increase with the usage of minted commands.

Sadly I have no good idea how to beginn debugging this issue and could not find anything related.