arcpy Pro notebook old arcpy.SetProduct("arcinfo") <-> arcpy.CheckProduct("ArcInfo") question?

625
1
Jump to solution
02-14-2022 10:41 PM
JohannesBierer
Occasional Contributor III

Hello,

we have a concurrent license model on a seperate server. We are only allowed to check out the advanced license for the needed time ... . In arcpy ArcMap you could set the product temporarily very easy, in Pro 2.8 notebook this doesn't seem to work with check product in our case.

There's always the message "ArcGIS for Desktop Advanced license not available" even if more than one  license is available with the following code?

import sys
import arcpy

arcpy.env.workspace = "c:/data/world.gdb"

if arcpy.CheckProduct("ArcInfo") == "Available":
    arcpy.PolygonToLine_management("Lakes", "LakeLines")
else:
    msg = 'ArcGIS for Desktop Advanced license not available'
    print(msg)
    sys.exit(msg)

Does this work only with licenses saved online?

Are there any workarounds?

It would be very uncomfortable to check out the license manually in Pro every time the advanced license is needed ...

 

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

And the Note in the followup link

Accessing licenses and extensions in Python—ArcGIS Pro | Documentation

sends you off to CheckInExtension etc. because CheckProduct has no effect in some situations.

(why everyone is licensed for everything is beyond me... it would make things so much easier... 😉  )

 


... sort of retired...

View solution in original post

0 Kudos
1 Reply
DanPatterson
MVP Esteemed Contributor

And the Note in the followup link

Accessing licenses and extensions in Python—ArcGIS Pro | Documentation

sends you off to CheckInExtension etc. because CheckProduct has no effect in some situations.

(why everyone is licensed for everything is beyond me... it would make things so much easier... 😉  )

 


... sort of retired...
0 Kudos