|
POST
|
I would use a SearchCursor to read all of the Z values into a python dict - indexed by the objectid. Then loop through the feature class with an UpdateCursor calculating the Delta value for each row and writing the result
... View more
06-18-2022
08:45 AM
|
0
|
1
|
1660
|
|
POST
|
I would try to run ListWorkspaces to see if arcpy is able to find any workspaces, then deal with why it can't find yours. It is odd that the slashes are being reversed.
... View more
06-06-2022
09:54 PM
|
0
|
0
|
1226
|
|
POST
|
There are a number of ways to do this, but for starters I would look at doing it in 2 steps: Run MakeFeatureLayer to select the records that you want to copy using the 'where_clause' parameter Run FeatureClassToFeatureClass to copy the selected records
... View more
06-06-2022
08:35 AM
|
0
|
0
|
568
|
|
POST
|
Sorry that was bad advice. I meant the ArcGIS Server Manager but that is irrelevant in your scenario. Maybe you could add code to retry the connection a failed connection a number of times? Is there something in your any of your scripts that would temporarily lock the database and prevent connections?
... View more
06-02-2022
04:45 AM
|
0
|
0
|
1352
|
|
POST
|
I would look in the Server Manager log to see if you can catch the error and hopefully see a better error message. You may have to turn on more detailed log level.
... View more
06-01-2022
06:08 PM
|
0
|
2
|
1365
|
|
POST
|
Hmmm - very strange. I run a lot of programs with arcpy from the task scheduler and have not seen anything link this. I would try to access one of your feature classes directly (instead of via ListFeatureClasses) - maybe you will get an error message that will be more enlightening that the empty list. You could also do a Describe on the workspace and dump out the results: f.write(str(arcpy.da.Describe(CGIntegrationsde)))
... View more
06-01-2022
09:34 AM
|
1
|
5
|
2601
|
|
POST
|
I'm not sure if this will help but maybe worth a try. I call my .bat files a bit differently from the task scheduler. In the "Edit Action" panel: Action: Start a program Program/script: cmd Add Arguments: /c <my bat file name> Start in (optional): <path to my bat file> I assume you are running the scheduled task on the same PC as where you run the bat file and your are sure you are running under the same Windows user. Is there any thing non-trivial in your bat file? Maybe you could share that with us too?
... View more
05-31-2022
02:02 PM
|
1
|
8
|
7670
|
|
POST
|
I tried this again this morning and now it works as expected. Very strange.
... View more
05-28-2022
03:32 PM
|
0
|
0
|
535
|
|
POST
|
I wrote some arcade to format a web map pop up and it works OK when I click the Test button but not when it gets called from a pop up. The code is trying to retrieve the x,y coordinates of the feature centroid. In the example below I've boiled it down to show that line 2 is causing the problem. When commented out, arcade returns the expected output. When left as-is, the popup shows nothing and reports no error. Any ideas> var center = Centroid($feature)
center.x // When I comment this out it "works"
return {
type : 'text',
text : 'Works'
}
... View more
05-27-2022
04:48 PM
|
0
|
1
|
573
|
|
POST
|
Ah - now I see. Lines 12 and 13 are indented incorrectly.
... View more
05-21-2022
05:56 PM
|
1
|
1
|
1774
|
|
POST
|
If you right click on TestToolbox.pyt do you get an option to "Check Syntax"?
... View more
05-21-2022
05:09 PM
|
0
|
3
|
1800
|
|
POST
|
Are you able to access r"\\a\folder\on\our\server\Data.gdb" from the failing computer - running under the same Windows user that is running when you run the toolbox code? I expect access to the shared drive is controlled by Windows so it has nothing to do with the ArcGIS credentials. I'd also try to recreate the error running the TableToTable tool interactively to eliminate any idea that there is something in your toolbox code that is causing the problem.
... View more
05-21-2022
05:07 PM
|
0
|
2
|
888
|
|
POST
|
It would be most helpful if you could post the error message, as well as the complete python file. I don't think there is anything wrong with the snippet you posted so there must be something else. Thanks
... View more
05-21-2022
04:51 PM
|
0
|
5
|
1888
|
|
POST
|
I think something like this would create and populate the table. tbl = <path to table>
arcpy.management.CreateTable(os.path.dirname(tbl), os.path.basename(tbl))
arcpy.management.AddField(tbl, 'name', 'TEXT', field_length=255)
arcpy.management.AddField(tbl, 'count', 'LONG')
with arcpy.da.InsertCursor(tbl, ['name', 'count']) as cursor:
for i in set(Occurances):
cursor.insertRow([str(i), Occurances.count(i)])
... View more
05-13-2022
02:31 PM
|
0
|
0
|
903
|
|
POST
|
Hi Linsday - it's really hard to read your code when it is posted that way - this article describes a better way. I would start by dumping out all of the paths that are referenced on the failing PC an simply see if I can access them from a DOS Command window. In particular I would look at the paths in the related tables properties (et. the origin and destinations). Another idea is to try it from a 3rd PC and see it it works there.
... View more
05-13-2022
06:10 AM
|
1
|
1
|
3100
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-18-2025 03:42 PM | |
| 1 | 11-19-2025 02:36 PM | |
| 1 | 08-11-2025 09:19 PM | |
| 2 | 08-07-2025 11:47 AM | |
| 1 | 01-18-2022 07:15 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-28-2025
04:52 AM
|