String systax misinterpretation
\2 is interpreted as an escape sequence started by a backslash (like \n is a newline). Use a raw string literal, r&quot;\Blender Foundation\Blender\2.91\scripts\addons\Mold_Generator_Addon&quot;, if you want a string where backslashes are interpreted literally.
But you should use os.path.join (or pathlib) to make paths anyway. os.path.join(&quot;Blender Foundation&quot;, &quot;Blender&quot;, &quot;2.91&quot;, &quot;scripts&quot;, &quot;addons&quot;, &quot;Mold_Generator_Addon&quot;)
But you shouldn't be hardcoding the path anyway. You can get the path to the directory containing the current .py file with os.path.dirname(os.path.abspath(__file__)). This works no matter where it is installed and no matter the Blender version.