|
POST
|
Must be a glitch; when I clicked save on the project, the points fixed themselves and were appropriately symbolized.
... View more
08-18-2020
07:49 AM
|
0
|
0
|
2418
|
|
POST
|
I have a bunch of points and I'm creating their symbology based upon a certain value. There are three values, all of the points fall into one of these values, however Pro is categorizing all of them as "all other values", so I cannot symbolize the layer correctly. I'm not sure how to fix this. Please see that all the points on the map are gray which matches the "all other values" category in the symbology pane. The "Count" column in the symbology pane says there are 0 features in the "all other values" category though and instead counts them correctly for the defined values. If I turn off "all other values" all the points disappear from the map. I have deleted and re-added this layer to the map with no luck.
... View more
08-18-2020
07:24 AM
|
0
|
1
|
2435
|
|
POST
|
This was quite a while ago now, but if I recall correctly, that did fix the issue.
... View more
08-18-2020
07:20 AM
|
0
|
0
|
1581
|
|
POST
|
In ArcMap you could use the Extract Data Wizard to export related feature classes to a new geodatabase and copy the schema of that geodatabase along with it. How do you do that in ArcGIS Pro? I can't find a suitable tool. Is the only way to do it to copy the entire GDB?
... View more
07-14-2020
07:06 AM
|
0
|
2
|
1366
|
|
POST
|
I have a field tech who physically is states away so I can't exactly look at his hardware, but they reported to me that they received a generic "failed to synchronize edits" message, tried again, and it worked and they did not receive an error message the second time... however I checked our DB and half the data that was supposed to sync is missing. The type of data being synced is two related point layers, e.g. the tech collected an origin point and then collected a bunch of related points (observations) tied to the "origin" by an automatically generated ID as in a 1:M relationship. It successfully synced all of the origin points but none of their related observations. I went into our server logs and saw these error messages, suggesting that the related points never had the origin ID tied to them which should be impossible when collecting with Collector. You cannot add related points without first having an origin point when using related feature services in Collector to my knowledge. Will those observations still be salvageable by getting the runtime GDB off the phone or did it erase them from local storage when the second sync finished without error? How can I avoid issues like these in the future? We are still using Collector Classic.
... View more
07-06-2020
09:46 AM
|
0
|
0
|
782
|
|
POST
|
Apparently multiprocessing doesn't appreciate class objects (e.g. "self") as arguments, so I needed to make my function global instead of just within the scope of the class that it really applies too. Then I was able to pass a property of self in-place of self. Perhaps there is another way to do this where you can use self as an argument and get things to work how I originally wanted them to, but this was the only solution I was able to make work. Here's the final code: import arcpy, multiprocessing, os
####################
# Class Definitions
####################
class DomainData(object):
'''This is the base class for all domain data'''
def __init__(self, folderPath, gdbPath, dbCon):
#properties
def createDomain(self, wsRows, tblName):
#Make Excel file
#Save the file
wb.save(self.wkbkName)
savedTable = os.path.join(self.gdb, tblName)
#Convert the excel file to an ArcMap table.
p = multiprocessing.Process(target=excl2Tbl, args=(self.wkbkName, savedTable))
p.start()
p.join()
arcpy.AddMessage("process ended")
#do more stuff
##############################
# Global function definitions
##############################
def excl2Tbl(file, tbl):
'''This function converts and excel file to an ArcMap table'''
arcpy.ExcelToTable_conversion(file, tbl)
############
# Main code
############
if __name__ == "__main__":
#do stuff
sprFA_dom.createPointDomain()
#continue with the script
... View more
06-18-2020
10:31 AM
|
1
|
0
|
2646
|
|
POST
|
I'm trying to start a separate process to run the ExcelToTable tool since running that tool in the same process as the rest of the script breaks all breakpoints that come after that line (supposedly this bug has been known for years but apparently no one wants to fix it) and I still need to be able to use breakpoints so... how can I get this process to run? Since I just need to run this tool a single time and wait for it to finish, I'm using the Process method instead of the Pool method. When I run my script, I get an error about being unable to pickle a geoprocessing result object. class DomainData(object):
'''This is the base class for all domain data'''
def __init__(self, folderPath, gdbPath, dbCon):
#properties
def createDomain(self, wsRows, tblName):
#Make Excel file
#Save the file
wb.save(self.wkbkName)
savedTable = os.path.join(self.gdb, tblName)
#Convert the excel file to an ArcMap table.
p = multiprocessing.Process(target=DomainData.excl2Tbl, args=(self, savedTable))
p.start()
p.join()
arcpy.AddMessage("process ended")
def excl2Tbl(self, tbl):
arcpy.ExcelToTable_conversion(self.wkbkName, tbl)
if __name__ == "__main__":
#do stuff
sprFA_dom.createPointDomain()
#continue with the script This is the error that comes back: pickle.PicklingError: Can't pickle 'geoprocessing server result object' object: <geoprocessing server result object object at 0x1E415BA8> I get that geoprocessing objects of any sort aren't pickleable, but I don't need to do anything with the object created; I don't need to return it. How do I get the process to just ignore it?
... View more
06-18-2020
09:25 AM
|
0
|
1
|
2707
|
|
POST
|
That's a good idea, I can give that a shot. Thanks.
... View more
06-18-2020
06:22 AM
|
0
|
0
|
2288
|
|
POST
|
Do you have an example of using the multiprocessing module that you can share?
... View more
06-18-2020
05:36 AM
|
0
|
0
|
2896
|
|
POST
|
If you're talking about Data Store proper (the thing that comes with ArcGIS Enterprise), we don't have that or portal installed. Just Server. But all the databases are registered with the server.
... View more
06-18-2020
05:31 AM
|
0
|
2
|
2288
|
|
POST
|
Database authentication is used for geoprocessing services.
... View more
06-17-2020
11:23 AM
|
0
|
4
|
2288
|
|
POST
|
Problem still exists in 2020. Using Visual Studio Enterprise to code in python. Any call to ExcelToTable or TableToExcel makes all breakpoints afterward non-functional. If I comment out those lines, the breakpoints will work again.
... View more
06-17-2020
11:21 AM
|
0
|
0
|
2896
|
|
POST
|
"Solved" this by some miracle and sheer dumb luck after hours of fiddling around and exiting in and out of ArcMap. 1) Load up your toolbox and run the script. Open the results window. 2) Share result as a geoprocessing service and set all your settings 3) Hit "Publish" and wait for the errors to appear 4) Exit out of the publishing dialog but SAVE the service draft 5) Exit out of ArcMap 6) Reopen ArcMap and go into your server connection 7) Open the "Drafts" folder in your server connection and double click on the draft 😎 Run "Analyze" again. This time no errors appear 9) Publish. It will succeed and run as expected for absolutely no reason. Thanks ESRI.
... View more
06-05-2020
08:24 PM
|
0
|
0
|
1235
|
|
POST
|
I have created a python script that contains all of my database connection strings and when I'm working locally, I can just import those strings like you would any regular module and use them. When I publish a geoprocessing service though, I can't figure out how to use an imported module like this because those connection strings won't be made into g_ESRI variables. My goal is to have one central place to update all my connection string paths if they change in the future, rather than going into 50 different scripts and changing each one. This is what my database connection python file (DatabaseConnections.py) looks like: hb_db_con = r'C:\Users\xxx\AppData\Roaming\ESRI\Desktop10.7\ArcCatalog\FocalAreas_HabitatWriter.sde'
fa_db_con = r'C:\Users\xxx\AppData\Roaming\ESRI\Desktop10.7\ArcCatalog\HbMon_HabitatWriter.sde'
#So on and so forth The top of the geoprocessing service I publish imports those connections like so: from DatabaseConnections import hb_db_con, fa_db_con
fc1 = hb_db_con + "\blah.DBO.blahblah"
fc2 = fa_db_con + "\blah2.DBO.blahblahblah" I have copied DatabaseConnections.py to the server's python library so it can find the connection strings, but obviously it doesn't convert them to where the server should find the data and instead just takes the hard-copied connection string and goes searching, coming up with nothing. Is there a way to centralize database connection strings in your code and still make it publishable?
... View more
06-05-2020
07:48 PM
|
0
|
6
|
2370
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-18-2020 10:31 AM | |
| 2 | 09-16-2025 02:17 PM | |
| 3 | 09-12-2025 09:26 AM | |
| 1 | 08-16-2023 05:11 PM | |
| 1 | 02-27-2024 06:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
09-16-2025
02:16 PM
|