I'm trying to set a global variable containing the current APRX version.
glblcurVer = arcpy.mp.ArcGISProject("CURRENT").documentVersionThis works great for the most part except it gives me an OS error if I call this as part of the toolbox initialization.

Does anyone have any ideas for how to make this work? It's a variable used in a majority of the tools in this toolbox, so I'd prefer to not have to re-create it for each tool.
EDIT: My temporary work around is to call a function to set the global variable on each tool's initialization, rather than on the PYT. It appears to work so far, but I'm still open to ideas, here.