Select to view content in your preferred language

ArcGIS Pro python script tool - Error 000824: The tool is not licensed - GeoTaggedPhotosToPoints

361
4
04-02-2024 11:31 AM
kmsmikrud
Regular Contributor

Hi,

I am using ArcGIS Pro 3.0.6 and have an advanced named license from AGOL.

With ArcGIS Pro open I am trying to run a script tool with the following geoprocessing included.

 

arcpy.management.GeoTaggedPhotosToPoints(r"D:\PWS_Herring\Photo_Test\0407", r"D:\PWS_Herring\Photo_Test\HAS_Photos_Test.gdb\test_geotag7", None, "ONLY_GEOTAGGED", "ADD_ATTACHMENTS")

 

 The GeoTagged Photos to Points geoprocessing tool within ArcGIS Pro works great. If I copy the command to the python window within an open project this also runs successfully.

However in the script tool I am unable to get the GeoTaggedPhotosToPoints to work. I get the following message pointing to the ERROR 000824: The tool is not licensed.

This doesn't make sense to me since I am using the advanced named license with ArcGIS Pro open.

Any insights would be much appreciated- Kathy

Traceback (most recent call last):
  File "P:\kmsmikrud\CF\AGOL_Collector\Region2\Herring_PWS\PWS_Herring_2023\Script\PWS_ProcessPhotos_040124.py", line 67, in <module>
    arcpy.management.GeoTaggedPhotosToPoints(r"D:\PWS_Herring\Photo_Test\0407", r"D:\PWS_Herring\Photo_Test\HAS_Photos_Test.gdb\test_geotag7", None, "ONLY_GEOTAGGED", "ADD_ATTACHMENTS")
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 13311, in GeoTaggedPhotosToPoints
    raise e
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 13308, in GeoTaggedPhotosToPoints
    retval = convertArcObjectToPythonObject(gp.GeoTaggedPhotosToPoints_management(*gp_fixargs((Input_Folder, Output_Feature_Class, Invalid_Photos_Table, Include_Non_GeoTagged_Photos, Add_Photos_As_Attachments), True)))
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (GeoTaggedPhotosToPoints).


Failed script (null)...
Failed to execute (ProcessSurveyPhotos).

 

0 Kudos
4 Replies
EdMorris
Esri Contributor

Hi Kathy

So, you are right. The geoprocessing tool does require an Advanced license which you appear to have.

You say you are using the tool in a Python Script tool. I wonder what license the script tool is using?

Could you write the following to test what license you are using:

prod = arcpy.ProductInfo()

arcpy.AddMessage(f"License is {prod})

The above code will write your license out to the View Details dialog. If this returns ArcInfo / Advanced then we know you have the right license.

In which case I wonder if the error message is misleading....?

Could you create another another script tool to consume only the GeoTagged To Points tool to see if that runs OK?

If it does then I suspect that there may be an issue with how the parameters are passed into the tool....

Are you sure your output geodatabase is a v10 geodatabase?

I'm just trying to think about how to trouble shoot the tool for...

I hope this helps ed

0 Kudos
kmsmikrud
Regular Contributor

Hi Ed,

Thanks so much for your help. I did add in the syntax for the license and it returns ArcInfo.

I did move the code to a new file with only the GeoTagged To Points tool and I still get the same error. 

In looking at the file geodatabase it says "Upgrade Status - This 10.0 geodatabase matches the ArcGIS release you are currently using".

In testing, I've run the tool directly from the toolbox in ArcGIS Pro and this runs the same parameters as those used in the script tool. After the tool runs I have just copied the python command directly from the tool history and used that in both the Python window and copied directly to the script. 

import arcgis, sys
import os
import pandas as pd
import math
import arcpy
from arcpy import env
from pandas import Timestamp
import pytz
import numpy
from os.path import exists

arcpy.env.overwriteOutput = True

scriptpath = sys.path[0]
toolpath = os.path.dirname(scriptpath)
temp_outpath = "memory"


prod = arcpy.ProductInfo()
arcpy.AddMessage(f"License is {prod}")

arcpy.AddMessage("Starting Up")
arcpy.AddMessage("Geotagging photos to points")
arcpy.management.GeoTaggedPhotosToPoints(r"P:\kmsmikrud\CF\AGOL_Collector\Region2\Herring_PWS\Photo_Test\0407", r"P:\kmsmikrud\CF\AGOL_Collector\Region2\Herring_PWS\Photo_Test\HAS_Photos_Test.gdb\test_geotag9", None, "ALL_PHOTOS", "ADD_ATTACHMENTS")

 

Start Time: Wednesday, April 3, 2024 7:14:49 AM
License is ArcInfo
Starting Up
Geotagging photos to points
Traceback (most recent call last):
  File "P:\kmsmikrud\CF\AGOL_Collector\Region2\Herring_PWS\PWS_Herring_2023\Script\PWS_PhotoTest.py", line 36, in <module>
    arcpy.management.GeoTaggedPhotosToPoints(r"P:\kmsmikrud\CF\AGOL_Collector\Region2\Herring_PWS\Photo_Test\0407", r"P:\kmsmikrud\CF\AGOL_Collector\Region2\Herring_PWS\Photo_Test\HAS_Photos_Test.gdb\test_geotag9", None, "ALL_PHOTOS", "ADD_ATTACHMENTS")
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 13311, in GeoTaggedPhotosToPoints
    raise e
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 13308, in GeoTaggedPhotosToPoints
    retval = convertArcObjectToPythonObject(gp.GeoTaggedPhotosToPoints_management(*gp_fixargs((Input_Folder, Output_Feature_Class, Invalid_Photos_Table, Include_Non_GeoTagged_Photos, Add_Photos_As_Attachments), True)))
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (GeoTaggedPhotosToPoints).

  I've been using script tools for quite sometime but this is puzzling.  

Thanks and appreciate your time,

Kathy

0 Kudos
EdMorris
Esri Contributor

Hi Kathy

As you say... this is puzzling.
What I will do is create my own script tool to use this geoprocessing tool. I will have a look on friday and let you know how i get on. Many thanks ed

0 Kudos
kmsmikrud
Regular Contributor

Thanks Ed!

Update is a coworker can run the script tool successfully in their desktop Pro version 3.2.x without any errors. I'm still using 3.0.6 and I also tried the same script tool in 2.9.x, but both of those get the same errors above.

Its so weird that the Geoprocessing tool will and also in the python window within Pro itself but not the script tool, must be a bug/disconnect of some sort.

I appreciate your time and info. I'm glad it at least runs on my coworkers machine.

Thanks,
Kathy

0 Kudos