addDataFromPath - RuntimeError (convertArcObjectToPythonObject)

2151
3
11-01-2020 05:51 AM
anyry
by
New Contributor III

Hello,

If I want add data with addDataFromPath:

aprx = arcpy.mp.ArcGISProject("current")
m = aprx.listMaps("Map10")[0]
m.addDataFromPath("C:\\Users\\aneta.ryglova\\Desktop\\Data_ZTM5_pro_Asseco\\Asseco\\Asseco_20201005.gdb\\T_MASKY_ANOTACI_M")

it return:

return convertArcObjectToPythonObject(self._arc_object.addDataFromPath(*gp_fixargs((data_path,), True)))
RuntimeError

and I don't know why, can you help me please?

Thanks

3 Replies
DavidPike
MVP Frequent Contributor

Looks OK to me.

Please add some print statements for each line.

0 Kudos
云明苏
New Contributor

Is the problem solved? plase tell me the result if it solved

0 Kudos
LauraTateosian
New Contributor III

I'm having the same problem with an ESRI GRID raster, except I'm trying it from a stand-alone script (not the "CURRENT" project).

0 Kudos