ArcGIS desketop 10.3 breaks Python script...

4318
8
03-10-2015 11:32 AM
VenusScott
Occasional Contributor III

Argh! I use Python scripts to run my routine and adhoc SDE data updates that I get from our users. I made the mistake of upgrading to ArcGIS Desktop 10.3 before testing out my scripts. (Not to worry, I still have 10.2.1 on a virtual desktop!) When I went to run a script to perform routine SDE updates with the 10.3 version, the script crashed at my "change privileges" section

I found that I could modify the script and assign privileges "individually" instead of the existing "batch" mode. Wait . . . I have a poop-load of SDE Python data maintenance scripts! Now I have to go in and modify ALL my scripts! (see above profile picture)

After reporting this to ESRI support, it was reproduced on their end and a bug fix will be forthcoming. (I don't have the bug # or est. date of fix yet.) In the mean time instead of modifying ALL my scripts, I will use my virtual machine to perform the updates . . . under protest!

I don't know how many others out there use the Python script code - "Change Privileges", so I thought I'd pass this information along . . .

Broken code:    arcpy.ChangePrivileges_management(GISADM_B_D, "SDESEL, GISAPP, WSDSEL", "GRANT", "")

Replaced w:     arcpy.ChangePrivileges_management(GISADM_B_D, "SDESEL", "GRANT", "")

                         arcpy.ChangePrivileges_management(GISADM_B_D, "GISAPP", "GRANT", "")

                         arcpy.ChangePrivileges_management(GISADM_B_D, "WSDSEL", "GRANT", "")

0 Kudos
8 Replies
RebeccaStrauch__GISP
MVP Emeritus

Thanks for sharing.  I haven't hit this problem yet, but most likely will.​

SusanJones
Occasional Contributor II

The path to Python Home variable has changed,

The existing environment variable is probably still looking at the last arcpy version.

0 Kudos
VenusScott
Occasional Contributor III

Thanks Susan! I'll check it out!

0 Kudos
MichaelVolz
Esteemed Contributor

Venus:

Can you provide more of the code?

I think the issue might be the path to the SDE connection file that is being used in the script.  I found that an mxd where I had paths to SDE had to include the full path to the SDE connection file at v10.2.x.  In 10.3 when I performed the Set Data Source on an mxd in ArcCatalog, I changed the SDE connection to the full path, but when the connection was saved it just said "Database Connections\SDE_USER on SDE DEFAULT.sde" instead of "C:\Users\SDE_User\AppData\Roaming\ESRI\Desktop10.3\ArcCatalog\SDE_USER on SDE DEFAULT.sde".  Prior to v10.2, SDE connection files could be sourced as "Database Connections\SDE_USER on SDE DEFAULT.sde", so it appears that ESRI is reverting back to that format.

0 Kudos
VenusScott
Occasional Contributor III

Michael,

We use the connections from a network share as opposed to where the Arcxxx software is installed and individual users have unique connections. We have a very convoluted architecture that (surprisingly) actually works well for us.

The issue is in the "arcpy.ChangePrivileges_management" function. It only works for single assignment of users/roles and not batch assignment.

Thanx!

0 Kudos
SusanJones
Occasional Contributor II

Hi Vanessa

Did ArcSDE get upgraded at the same time as ArcGIS Desktop 10.3 was upgraded?

Stay solid and true with ArcSDE Desktop 10.2.1 until your testing has been done!

Susan

VenusScott
Occasional Contributor III

Well . . . I goofed an did my desktop upgrade before server or SDE (bad move, I know). I have had no other issues except the python batch privilege issue. We are in the process of upgrading server and SDE now, and we are even debating about just biting the bullet and upgrade to 10.3.1!

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Hi Venus, we also have a very convoluted architecture.  I like you idea of using common local variable names connecting to the network connections, which may be mapped differently for different users.  At least, that is what I think you are saying you do.  Any chance you have you workflow written up that you can share (here, direct-message or in a blog)? 

We're in the process of moving our two main data drives (on loca/virtual server) to network drives (located who knows where).  This has the potential of breaking thousands of mxd's of course.  I'm working on tools to make that process simpler for all of us, including users that are not-so fluent in GIS, so anything I can do to make theirs (and therefore my) live and transition easier, the better.

Thanks

0 Kudos