POST
|
It turns out that the problem was more of a Microsoft Windows security settings issue. Our new server has a Windows Server 2008 R2 operating system (old server - Windows Server 2003). There's some setting(s) or lack thereof that is preventing the recognition of the "Database Connections" part of the db connection path when accessing via a python script. Haven't resolved that yet but with the help of Umesh from ESRI tech support, I have a workaround that is described below: Instead of specifying the db connection as "Database Connections\sde_loader@bierstadt.sde" Obtain the path name on the C drive by right clicking the db connection in ArcCatalog and selecting properties. The path name is on the General tab. In my case, the name is: C:\Users\ehrhardt\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\bierstadt_saxon2.sde Inserted this name into the script, and the script finally worked! Thank you to Matthew & Wayne for your suggestions and to Umesh for the workaround solution.
... View more
11-28-2012
08:57 AM
|
2
|
2
|
4603
|
POST
|
Matthew, Thanks for your reply. I tried using a raw string for my path name to no avail. I am using an administrator account when running the script. I am able to successfully use the compress tool (from toolbox), so I don't think that there is a db lock issue. It's only when I try to compress from the python script that I encounter this maddening error. Gary
... View more
11-27-2012
10:23 AM
|
0
|
0
|
4603
|
POST
|
I have a very simple python script that does a compress on one of our enterprise GDB's. The script used to successfully run every night but is now receiving the following error: "ERROR 000837: The workspace is not the correct workspace type" There have been 2 recent changes to our environment - one of which must be a contributing factor to this script now erroring out. The first is upgrading from ArcGIS 10.0 SP4 to ArcGIS 10.1 SP1. The other is that we are now running this script on a new server where the old server had 32 bit processing, and the new server is 64 bit. Here is the script that worked on our old server: import arcgisscripting gp = arcgisscripting.create() gp.toolbox = "management" gp.compress("Database Connections\sde_loader@bierstadt.sde") Running the same script on the new server (only change being the db connection) errored out. I tried updating the python code as follows: import arcpy arcpy.ClearWorkspaceCache_management() arcpy.Compress_management("Database Connections\saxon2_bierstadt_sde_loader.sde") This also received the same error (000837) Any ideas on what may be causing this error would be much appreciated. Gary
... View more
11-20-2012
01:14 PM
|
1
|
12
|
16968
|
POST
|
Thanks to Robin and Huey for your quick responses. I went with the CSV approach and it worked great.
... View more
02-02-2011
11:00 AM
|
0
|
0
|
320
|
POST
|
I've written a python script that loops thru all records in a shapefile, checks each record for certain criteria and prints out certain fields from the records that meet the condition. That is working fine. Now instead of printing the results, I want to write these certain fields to either a text file or an excel file. Any suggestions on what commands or simple block of code might accompliss this? Here is my script that prints my results: import arcpy from arcpy import env env.workspace = "C:/workspace" pin_hold = "999999999999" area_hold = 0 township_hold = "" section_hold = "" quarter_hold = "" parcelname_hold = "" public_hold = "" corrsource_hold = "" text_file = open("rename_pins.txt", "w") rows = arcpy.SearchCursor("parcels_Identity6.SHP", "", "", "", "PIN; PARCELNAME; BLMPIN; TRANSFER; PUBLIC_; PARCEL_KEY; CORR_SOURC; Shape_area; Shape_len; Id; Township; Section; Quarter", "PIN A") for row in rows: if row.PIN == pin_hold: if row.Shape_area > area_hold: area_hold = row.Shape_area township_hold = row.Township section_hold = row.Section quarter_hold = row.Quarter parcelname_hold = row.PARCELNAME public_hold = row.PUBLIC_ corrsource_hold = row.CORR_SOURC else: if pin_hold[0:4] != township_hold or pin_hold[4:6] != section_hold or pin_hold[6] != quarter_hold: print pin_hold + ' ' + str(area_hold) + ' ' + parcelname_hold + ' ' + public_hold + ' ' + corrsource_hold pin_hold = row.PIN area_hold = row.Shape_area township_hold = row.Township section_hold = row.Section quarter_hold = row.Quarter parcelname_hold = row.PARCELNAME public_hold = row.PUBLIC_ corrsource_hold = row.CORR_SOURC print 'completed' Thanks, Gary
... View more
01-31-2011
11:47 AM
|
0
|
3
|
559
|
POST
|
Eric, Thanks very much. I've only had a little experience with applet files so your detailed response and example will help me a lot in creating toolbuttons. Much appreciated! Gary
... View more
08-10-2010
01:29 PM
|
0
|
0
|
293
|
POST
|
Eric, Thanks for your response. I think you nailed it with my problem. All of my forms that are not showing up in ArcPad are listed as 'FORM 1' and are not the EDITFORM. But I'm not clear on how to "fire them via a toolbutton" in order to have my forms replace the default EDITFORM. Do I need to come up with some code to create such a toolbutton? Gary
... View more
08-06-2010
09:30 AM
|
0
|
0
|
293
|
POST
|
I have created several custom forms for easier collection of data in ArcPad. The forms that contain comboboxes (for FC's with domains) are not showing up in ArcPad. Instead, the generic list of attributes show up when collecting data for such a FC. The custom forms that do not have any comboboxes on them show up just fine in ArcPad. Anyone have any idea what I may be missing? We are using ArcPad 8.0 SP3 Thanks, Gary
... View more
08-05-2010
02:31 PM
|
0
|
5
|
1292
|
POST
|
Figured out my own problem. The GPS points that were collected were outside the XY Domain boundaries that were defined for the feature class that the GPS points were being checked into. I needed to redefine my feature class with XY domain values that relect the potential territory for GPS collection.
... View more
05-17-2010
01:15 PM
|
0
|
0
|
135
|
POST
|
All, Point and line data were collected with a Trimble GeoXH. When I checked in this data to my PGDB vis ArcPad Data Manager, I received a message that said that everything was successfully checked in. The line data did process successfully. However for the point data, Only the attributes seem to exist for my new points. The attribute table for my point layer shows rows for each new point collected. But nothing is showing up spatially - no points drawn in ArcMap. Has anyone come across such a scenario? Any ideas for a fix? Thanks, Gary
... View more
05-11-2010
09:04 AM
|
0
|
1
|
530
|
Title | Kudos | Posted |
---|---|---|
2 | 11-28-2012 08:57 AM | |
1 | 11-20-2012 01:14 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|