I have ran into a problem while trying out the ESRI sample "CallScriptFromNet". I have my own scripts that I would like to try but they seem to get stuck when I create a "arcpy.mp.ArcGISProject('current')" variable. I get this message:

The script being referenced in C#:

The code works fine in Pro's Python window and its the correct parameter for that variable to work. I am using this line of code so I can get a list of layers, check if they are properly named, etc...
Any ideas what I should do?