Minimal working example
\documentclass[a4paper]{article}
\usepackage[german, ngerman]{babel}
\usepackage{ngerman} % I am the bad line
\usepackage{pythontex}
\begin{document}
\begin{pycode}
print("y")
\end{pycode}
\end{document}
Running
yields
! Argument of " has an extra }.
<inserted text>
\par
l.284 \StrSubstitute{\pytx@jobname}{"}{}
[\pytx@jobname]
removing the ngerman line makes it run again.
Minimal working example
Running
yields
removing the
ngermanline makes it run again.