How to add raster dataset to active map contents using arcPy in ArcGIS Pro? The code below gives me an error on line 10, "ValueError: tempRas". I am trying to migrate ArcMap 10.5 to ArcGIS Pro and I am having difficulty finding a solution for this problem. I would very much appreciate your help.
aprx = arcpy.mp.ArcGISProject('CURRENT')
ras = '<path to>\\example.tif'
rasTempLyr = arcpy.MakeRasterLayer_management(ras, 'tempRas')
activeMap = aprx.activeMap