spatial license "NotLicensed" in stand alone script...

2061
16
04-09-2014 05:45 AM
MichaelBlom
New Contributor III
... but fine (Available) when I debug the script in a python IDE.

In this doc on page 116, I read that the setting of product and extensions is necessary only within stand alone scripts.

So in my py script, I first do the full check for the spatial analyst license, but it fails when I call this script from a command window.

If I open administrator, and see what I have installed, Spatial Analyst is there: Installed, Authorized and Permanent (non expiring). Single Use, so no license server to point at.

Does anyone have any hints about how I can solve this?

Thanks,
Mike
Tags (2)
0 Kudos
16 Replies
MichaelBlom
New Contributor III
sys.path output
0 Kudos
MathewCoyle
Frequent Contributor
Yeah there are no desktop references. You will need to add these to your system paths, and possibly remove the server library references. Modifying depending on what drive/folder you have desktop installed. You will need the 64 bit desktop geoprocessing patch if you don't already.
 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\bin',
 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\arcpy',
 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\ArcToolbox\\Scripts'

I'm not 100% sure if this will solve your problem or not as I've never dealt with a mixed install like this before.
0 Kudos
MichaelBlom
New Contributor III
Thanks for helping out with this.
How do I edit my (Python?) system paths?

It's very strange, because I've had this setup before, and it's worked fine.

Thanks again.
0 Kudos
MichaelBlom
New Contributor III
I haven't tried yet, but this looks to be a solution:

http://support.esri.com/es/knowledgebase/techarticles/detail/39029
0 Kudos
MichaelBlom
New Contributor III
So, the solution I linked to above describes what to do if desktop level of licensing is interfering with a server level of licensing.

What's the solution for the problem where I have a server level of licensing blocking me from running python scripts that rely on a desktop level of licensing?

From what I've read, one cannot revert or degrade their level of licensing, and I would not want to do this and run the risk of ArcGIS server then not functioning properly.

What I don't get is "why are desktop and server part of the same spectrum of licensing??!!"

Maybe I can register spatial analyst extension with my server license?  has anyone done this ever?
0 Kudos
MathewCoyle
Frequent Contributor
Spatial Analyst for ArcGIS Server is a separate extension requiring it's own license.

http://www.esri.com/software/arcgis/arcgisserver/extensions/spatial-extension

Their licensing is separate but their geoprocessing overlap.
0 Kudos
MichaelBlom
New Contributor III
Yes, and I have Spatial Analyst installed, authorized, authenticated, polished & shined, and ready to go.

But the fact of the matter, is that my check for licenses needs to go through the Desktop version of the geoprocessing python scripts to see this.
0 Kudos