0

I'm having issues with some scripts that import an arc editor licence to run (similar to the example given on this page http://resources.arcgis.com/en/help/main/10.1/index.html#//002z0000000z000000), yet do not return the licence to the licence manager once the script has been successfully completed.

Does anyone know of similar functionality to "arcpy.CheckInExtension, arcpy.CheckOutExtension", which could be applied to Product Modules (arcinfo, arceditor, arcview and so on)?

5
  • 2
    You should only need to check in/out licenses for the extensions. The ArcGis license is obtained when arcpy is imported using the settings from desktop administrator (ArcGis Administrator). Commented Nov 6, 2014 at 2:49
  • Thanks Michael, yep I'm aware of that however my configuration has one editor licence, these scripts are scheduled and the licence needs to be made available to the pool again upon completion (for others to use).
    – Whytefish
    Commented Nov 6, 2014 at 3:01
  • 2
    Are you running the script from command line (via scheduled task or similar)? Usually the license is returned when the command prompt terminates, if you can't do that you've got problems as a module cannot be unimported see stackoverflow.com/questions/8781257/… Commented Nov 6, 2014 at 3:04
  • Yes via task scheduler and batch files, that's where I'm running into issues as it doesn't seem to always reliably return the licence after termination. Looks like I might need to log a support ticket. Thanks for your help!
    – Whytefish
    Commented Nov 6, 2014 at 3:08
  • When your script finishes, does it do a proper cleanup? Like deleting all the cursors from memory, del arcpy and all that?
    – Menno
    Commented Nov 6, 2014 at 12:58

1 Answer 1

1

I used to have this kind of problem when ArcMap crashed and my floating licence were not returned. In this case the problem is on the server side.

The "hard way" is to stop and start your flexLM server. Usually this has no impact on the works in progress because ArcGIS is not checking the licence all the time. You can also do it for a specified user based on its ID, by launching lmutil.exe (apparently this can be done from the client, but I've only used it from the server)

%lmtool_loc%\lmutil.exe lmremove %feature% %userid% %host% %display%

Another solution is to borrow the licence from the client. This is safer from the floating licence point of view because the licence will be released after the planned period (crash or no crash). However, you need to know how long your script will last because you cannot prolonge.

There are some tools for managing floating licence, but the one we used is not free so I would rather buy a second ArcEditor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.