|
POST
|
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.
... View more
03-01-2019
06:49 AM
|
0
|
0
|
2100
|
|
POST
|
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).
... View more
02-28-2019
02:26 PM
|
0
|
2
|
2100
|
|
POST
|
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=799004#comment-799004
... View more
02-28-2019
01:15 PM
|
0
|
5
|
2307
|
|
POST
|
Robert, Thanks, I marked your latest reply as correct. I added the route url as you pointed out. It was still throwing the same error in the Chrome console. On top of that, I had to add two more <serverUrl> tags in the config file to get it to work. One was for my organisation's AGOL account and the other was to ArcGIS REST services url. I had to create a new app at ArcGIS for Developers so that I could obtain a ClientID and ClientSecret. See code from config file below. <?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
mustMatch="true">
<serverUrls>
<serverUrl url="https://willcountygis.maps.arcgis.com" username="blabla" password="blabla" rateLimit="600" rateLimitPeriod="60"
matchAll="true"/>
<serverUrl url="https://route.arcgis.com/" username="blabla" password="blabla" rateLimit="600" rateLimitPeriod="60"
matchAll="true"/>
<serverUrl url="https://services.arcgis.com/" clientid="blabla" clientSecret="blabla" rateLimit="600" rateLimitPeriod="60"
matchAll="true"/>
</serverUrls>
</ProxyConfig>
... View more
02-27-2019
11:14 AM
|
0
|
0
|
1673
|
|
POST
|
<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
mustMatch="true">
<serverUrls>
<serverUrl url="http://services.arcgisonline.com"
matchAll="true"/>
</serverUrls>
</ProxyConfig> Robert, Here's the content of the config file. How would I do that?
... View more
02-26-2019
02:28 PM
|
0
|
3
|
1673
|
|
POST
|
I want to use the Directions widget in a custom app. I'm using 4.9. To avoid the prompt to sign in I'm setting up the proxy. -Tested the DotNet proxy. It works. -Put in the relevant code as such: require(["esri/core/urlUtils"], function(urlUtils) {
urlUtils.addProxyRule({
urlPrefix: "route.arcgis.com",
proxyUrl: "https://webapp.willcountyillinois.com/DotNet/proxy.ashx"
});
}); Got the following error on Chrome console. The widget isn't working. Not sure why.
... View more
02-26-2019
02:18 PM
|
0
|
5
|
1770
|
|
POST
|
You can Clip Layers in ArcPro just like in ArcMap. But I think it's even enhanced as I don't remember a dropdown that can exclude layers from being clipped-- pretty nice. All you do is left click the map frame on the Layout tab --> Properties --> Clip Layers
... View more
02-21-2019
08:37 AM
|
2
|
9
|
3067
|
|
POST
|
I'm working from the Python console in Pro 2.3 and when I importDocument it seems to work but nothing opens. The parameters call for the document and it's layout, so I tried that too. Is there another step that I'm missing? import arcpy
p = arcpy.mp.ArcGISProject('CURRENT')
#importDocument(document_path, {include_layout})
p.importDocument(r'path\to\MUNICIPAL_LIMITS_A.aprx') There was a similar question to mine here, but it's sort of dated: arcpy - Importing MXD to ArcGIS Pro programmatically? - Geographic Information Systems Stack Exchange "To follow up on my comment, the code you posted does work, but does not automatically open the newly imported map."
... View more
02-08-2019
07:27 AM
|
0
|
3
|
4168
|
|
POST
|
With additional help I was able to run the code with the desired output. Whereas before all PDFs except the last one were overwritten because they shared the same name as the folder (TestFolder2), they are now given a unique name in the exportToPDF() function. import arcpy, os
rootDir = r"path\to\TestFolder2"
outfolder = r"path\to\TestFolder2"
for dirName, subdirList, fileList in os.walk(rootDir):
for file in fileList:
if file.endswith(".aprx"):
current_aprx = arcpy.mp.ArcGISProject(os.path.join(rootDir, file))
for cnt, lyt in enumerate(current_aprx.listLayouts()):
pdf_name = os.path.join(outfolder, file[-5], lyt.name)
print(lyt.name)
lyt.exportToPDF(outfolder + "/" + lyt.name)
print("exporting APRX to PDF: {}{}{}".format(pdf_name, cnt, ".pdf"))
current_aprx.save()
del current_aprx
... View more
02-04-2019
08:38 AM
|
0
|
0
|
2520
|
|
POST
|
Yes, that's correct. I copied the path from ArcCatalog. This path is what I used in ArcGIS for Desktop Arcpy scripts and it always worked fine. I'm not sure how to specify the full Windows file system path?
... View more
01-31-2019
01:40 PM
|
0
|
1
|
12617
|
|
POST
|
Joshua, I ran the same few lines of code that you have, but instead I'm directing the path to a Feature Class in an .SDE. Here's the full error: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\_mp.py", line 1248, in addDataFromPath
return convertArcObjectToPythonObject(self._arc_object.addDataFromPath(*gp_fixargs((data_path,), True)))
RuntimeError
... View more
01-31-2019
12:32 PM
|
0
|
3
|
12617
|
|
POST
|
Ok, Thanks. I'll have to get back to this on Thursday. Our building is being closed because of the cold weather.
... View more
01-29-2019
01:49 PM
|
0
|
0
|
12617
|
|
POST
|
I'm using Pro 2.0. If you look at line 9 above that's what I did pretty much (also noted the errors above) Is your feature class coming from a FGDB? Because I'm able to add a feature class from a FGDB. The thing is I'm trying to bring in a feature class from an SDE.
... View more
01-29-2019
12:54 PM
|
0
|
6
|
12617
|
|
POST
|
How do I add a feature class from an SDE to a Map in Pro? This is where most of our data is stored. Here's what I've tried: import arcpy
p = arcpy.mp.ArcGISProject("CURRENT")
map = p.listMaps()[0]
#this returned a ValueError
map.addLayer(r"Database Connections\path\to\gisedit.DBO.Address_Points")
#this returned a RuntimeError
map.addDataFromPath(r"Database Connections\path\to\gisedit.DBO.Address_Points")
All the methods for using classes seem to be referencing layer files, and nowhere do I see a reference to feature classes. Alphabetical list of arcpy.mp classes—ArcPy | ArcGIS Desktop EDIT: The confusing thing is that when feature classes from the SDE are in the Map they're referred to as layers. The CURRENT project I'm testing on already has two feature classes from an SDE in it. You can list them with the following: for lyrname in map.listLayers():
print(lyrname.name)
... View more
01-29-2019
09:42 AM
|
0
|
9
|
14245
|
|
POST
|
Thanks Dan. No errors, but still not seeing PDFs saved to the outFolder. There are two APRXs in this test folder. And as before running this script saves one PDF not in the TestFolder2 folder, but one spot back. And the PDF is named "TestFolder2". Here's the whole thing again with the print statements below it. import arcpy, os
rootDir = r"path\to\TestFolder2"
outfolder = r"path\to\TestFolder2"
for dirName, subdirList, fileList in os.walk(rootDir):
for file in fileList:
if file.endswith(".aprx"):
current_aprx = arcpy.mp.ArcGISProject(os.path.join(rootDir, file))
pdf_name = os.path.join(outfolder, file[:-4])
for cnt, lyt in enumerate(current_aprx.listLayouts()):
print(lyt.name)
lyt.exportToPDF(outfolder)
print("exporting APRX to PDF: {}{}{}".format(pdf_name, cnt, ".pdf"))
current_aprx.save()
del current_aprx MUNICIPAL_LIMITS_A
exporting APRX to PDF: path\to\TestFolder2\MUNICIPAL_LIMITS_A - Copy.0.pdf
MUNICIPAL_LIMITS_A
exporting APRX to PDF: path\to\TestFolder2\MUNICIPAL_LIMITS_A.0.pdf
... View more
01-28-2019
08:20 AM
|
0
|
1
|
2520
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | a month ago | |
| 1 | 07-24-2025 01:27 PM | |
| 1 | 11-13-2025 08:22 AM | |
| 1 | 11-12-2025 08:37 AM |
| Online Status |
Online
|
| Date Last Visited |
14 hours ago
|