AGP 2.3.1 UpgradeDataset_management

882
5
02-28-2019 01:15 PM
JaredPilbeam2
MVP Regular Contributor

arcpy.UpgradeDataset_management('Street_Anno_E')
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 6117, in UpgradeDataset
    raise e
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 6114, in UpgradeDataset
    retval = convertArcObjectToPythonObject(gp.UpgradeDataset_management(*gp_fixargs((in_dataset,), True)))
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 498, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
Failed to execute (UpgradeDataset).‍‍‍‍‍‍‍‍‍‍

I can't edit the annotation on an ArcGIS Pro 2.3.1 project. It's an imported MXD with an annotation feature class. Using arcpy I attempted to upgrade the anno, but got an error. I haven't contacted ESRI Support yet because I wanted to see if anyone knows about this. There was a similar question regarding upgrading asked, but it was using the tool: https://community.esri.com/message/799004-re-how-do-i-upgrade-annotation-for-use-in-pro?commentID=79... 

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

did you try the full path or is the environment set elsewhere?

0 Kudos
JaredPilbeam2
MVP Regular Contributor

No, the environment is not set elsewhere. There's only that one line. I also tried using the full path to the Dataset inside the FGDB, but it also threw an error. I'm working in the console, by the way.

import arcpy
arcpy.UpgradeDataset_management('\\gisfile\GISstaff\Jared\WillCoGIS_DataSHP_Pro.gdb\Street_Anno')

Error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 6117, in UpgradeDataset
    raise e
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 6114, in UpgradeDataset
    retval = convertArcObjectToPythonObject(gp.UpgradeDataset_management(*gp_fixargs((in_dataset,), True)))
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 498, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000110: \gisfile\GISstaff\Jared\WillCoGIS_DataSHP_Pro.gdb\Street_Anno does not exist
Failed to execute (UpgradeDataset).
0 Kudos
DanPatterson_Retired
MVP Emeritus

well, your …. arcpy.UpgradeDataset_management is the tool, just not having the surrounded unknown advantages of running outside of Pro.

Did it work with the tool? or did you try it?

curtvprice
MVP Esteemed Contributor

You must escape your path with r’\\gisfile...’. I think that’s why you are getting the dataset not found error.

JaredPilbeam2
MVP Regular Contributor

Dan,

Running the tool failed: 

Curtis,

Thanks, silly mistake. Using the string literal, however, it produced another error. 

arcpy.UpgradeDataset_management(r'\\gisfile\GISstaff\Jared\WillCoGIS_DataSHP_Pro.gdb\Street_Anno')‍‍
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 6117, in UpgradeDataset
    raise e
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 6114, in UpgradeDataset
    retval = convertArcObjectToPythonObject(gp.UpgradeDataset_management(*gp_fixargs((in_dataset,), True)))
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 498, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 001267: Dataset type does not support upgrade.
Failed to execute (UpgradeDataset).‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

 Upgrade Dataset—Data Management toolbox | ArcGIS Desktop

According to the Tool Reference page, the GDB in which the feature dataset resides must be updated before the dataset is updated. So, I ran the arcpy.UpgradeGDB_management() function. The resulting error said "the geodatabase is already at the current release". It seems I've come full circle.

default_gdb = r"\\gisfile\GISstaff\Jared\WillCoGIS_DataSHP_Pro.gdb"
arcpy.UpgradeGDB_management(default_gdb, "PREREQUISITE_CHECK", "UPGRADE")‍‍‍‍
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 6152, in UpgradeGDB
    raise e
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 6149, in UpgradeGDB
    retval = convertArcObjectToPythonObject(gp.UpgradeGDB_management(*gp_fixargs((input_workspace, input_prerequisite_check, input_upgradegdb_check), True)))
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 498, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 001046: The geodatabase is already at the current release and cannot be upgraded.‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos