POST
|
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
... View more
3 weeks ago
|
0
|
0
|
100
|
POST
|
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
... View more
3 weeks ago
|
0
|
0
|
133
|
POST
|
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).
... View more
3 weeks ago
|
0
|
4
|
212
|
POST
|
Thanks @Clubdebambos for the clarification on the attachments. Its been an interesting and frustrating learning experience in trying to make us of the ArcGIS API for python and move away from arcpy (as suggested by Esri solution engineers) only to find out objectives can't be met with the API. For instance, earlier in the scripts I updated the code from using arcpy and the UpdateCursor to use the edit_features like shown below. This works great to update attributes in the AGOL hosted feature layers, but then if you use arcpy and either the arcpy.conversion.ExportFeatures or the arcpy.FeatureClassToFeatureClass conversion, any records updated with the API are exported with blank values. When I would view the data in AGOL the data is all updated, but for some reason exporting using arcpy did not recognize those record updates. So then I was able to use the spatial.to_featureclass only to find out this won't work either because we need the attachments to download. So apparently you can't mix and match or do you know why the arcpy exports blank records updated with the API. updates_key_df.append(feature)
# Perform the update
result = lyr.edit_features(updates=updates_key_df)
Thanks again for the response. Kathy
... View more
03-25-2024
08:58 AM
|
1
|
1
|
184
|
POST
|
Hello, I recently just updated geoprocessing python script tools to use more of the API for python for processing AGOL hosted feature layers that are also in the scripts downloaded to local file geodatabases. Previously I had used the arcpy tool below which maintains attachments. arcpy.FeatureClassToFeatureClass_conversion However in the following updated snippet I do not see the photo attachments in the downloaded feature class. Is there an additional setting I need to set to maintain attachments? Or maybe there just aren't attachments in a spatially enabled dataframe to even export? fn_df.spatial.to_featureclass(location=out_features, sanitize_columns=False) I'm using ArcGIS API for Python 2.0.1 with ArcGIS Pro 3.0.3 Thanks, Kathy
... View more
03-23-2024
12:55 PM
|
1
|
3
|
306
|
POST
|
Hi, I am using argis package version 2.0.1 and it appears to be an issue in this version. I have been trying to troubleshoot where the change in datetimes occurs in a scripl figuring it was earlier in the script tool but I've narrowed it down to later when I use the spatial.to_featureset() I also found the link below on github. I have to admit its pretty discouraging since I've been working to update code from arcpy to the API only to run into this bug. df = s_lyr.query(where = AK_dt_fltr, out_sr = 26931).sdf
gsa = GeoSeriesAccessor(df['SHAPE'])
df['LENGTH_NM'] = gsa.get_length('PLANAR', 'NAUTICALMILES')
s_lyr.edit_features(updates = df.spatial.to_featureset()) https://github.com/Esri/arcgis-python-api/issues/1301
... View more
03-22-2024
05:58 PM
|
0
|
0
|
90
|
POST
|
Today (3/19/24) we are no unable to download offline maps from the device for multiple devices, AGOL web maps. This has been are work around and now this is failing.
... View more
03-19-2024
09:57 AM
|
2
|
0
|
274
|
POST
|
Hi, We have geoprocessing script tools to run in ArcGIS Pro for updating AGOL hosted feature layer attributes and downloading to local file geodatabases. We have been working to switch the python code from arcpy to the API for Python. In the process, I can run the script tools fine on my machine but I'm seeing differences for some of the biologists that need to run the same tools that are getting errors. For instance, in line 13 below this line works fine on 2 out of 4 users machines, but on one of them they are using ArcGIS Pro 3.1.x and continue to get the ValueError ("StringArray requires a sequence of strings or pandas.NA") if arcpy.Exists(in_track_ln_fc):
arcpy.AddMessage("Updating track line fields for AKCreationDate, AKDate, Year, Management Area")
lyr = gis.content.get('XXXXX').layers[1]
df = lyr.query(where = "AKDate IS Null").sdf
df['ManagementArea'] = 'XXXX'
df['start_time'] = df['start_time']- timedelta(hours=16)
df['end_time'] = df['end_time'] - timedelta(hours=16)
df['AKCreationDate'] = df['start_time']- timedelta(hours=8)
df['AKDate'] = (df['AKCreationDate'] + timedelta(days=1)).dt.strftime('%m/%d/%Y')
df['Year'] = df['start_time'].dt.strftime('%Y')
df['created_date'] = df['created_date']- timedelta(hours=16)
df['last_edited_date'] = df['last_edited_date'] - timedelta(hours=16)
lyr.edit_features(updates = df.spatial.to_featureset()) I've checked the dataframe and it has the records to update, but I don't understand or know how to fix the error when the code runs fine on my and a coworkers machine. I have ArcGIS Pro 3.0.x still. I'm not sure on the other user. Similarly different data but same use of the edit_features and the user is getting an error params["updates'] = json.dumps( Has anyone else had issues with different versions of ArcGIS Pro and the edit_features? Any insights? Thanks in advance!, Kathy
... View more
03-18-2024
07:19 PM
|
1
|
0
|
249
|
POST
|
Hi, Yes! I have been having the same issue with offline maps taking an hour to overnight to just not creating an offline map or progressing so I stop them. When I say progressing, sometimes I check what map layers have been packaged up within the 'Manage Offline Areas' and I'll see nothing has been packaged. These are offline maps from web maps we have been using for years now. I noticed the issue last week and do have an Esri tech support ticket open although they have not been able to pinpoint, but it is happening on multiple maps some with the same layers but not all. I've also noticed AGOL in general has been sort of locking up/slow behavior too. Earlier today the offline maps were noticeably faster and successful in creating them so I was hopeful the issue was resolved whatever it was. I'm glad I'm not the only one with an issue although that doesn't resolve it. I sent your post link to the Esri tech support as well. I know AGOL was showing as 'no issues' healthy but I've also learned that isn't always true. We are just starting field work for the year and so I'm not sure if this has been issue earlier than now. Thanks for posting and sharing this, @JustinColville do you have any info on the offline maps from AGOL being so slow? Kathy
... View more
03-14-2024
03:22 PM
|
2
|
0
|
368
|
POST
|
Hi, I'm wondering when/if the new fields in AGOL (date only, time only) will be available in Field Maps (offline). Is this in the next release by chance? If not (yet) what would you suggest as the best workaround for time (HH:MM) military time? Thanks!, Kathy
... View more
02-21-2024
03:48 PM
|
0
|
0
|
270
|
POST
|
Hi @JonSwoveland , We did get this to 'sort' of work. The unique ID is by sampler and then their own sample counts so the max record in our case is specific to each user and I created a field that increments for each user with their sample count and increments with each record submitted. This helps with folks working offline and querying only for that sampler's max count. However, the table that gets downloaded offline is specific to the offline area extent so we did have someone that was sampling in another management area (jet plane distance away) return to their area and I had to add in specific code for their user name to compensate for the max record since those samples weren't included in their 'area' offline map. According to @JustinReynolds , the arcade expressions execute when the data is submitted for each record and shouldn't change. We didn't fully test this but I did have someone say twice that when they returned to Wi-Fi and synched data their record count updated (this was prior to us implementing the max id per sampler). I actually posted on this but never got a response, but I also do believe them since they were doing a lot of quality control at the time. I'm not sure if this info is useful or can be applied but the max record count in our situation works offline when it is combined with sampler initials and only their records. I'll have to to look up the VertiGIS Studio Mobile. Thanks, Kathy
... View more
02-01-2024
09:40 AM
|
1
|
1
|
668
|
POST
|
Hi, Did you find a solution? I am trying to edit/remove individual labels using the Vector Tile Style Editor and searching for how to do this. Thanks, Kathy
... View more
01-20-2024
12:05 PM
|
0
|
0
|
67
|
POST
|
I'm right there with you on the best way to access the trace results in the stand-alone python script. I've tried Selection and Network Layers that I've been running as a script tool within ArcGIS Pro toolbox. My goal would be to have the script iterate over a few hundred starting points with a static downstream point. At the moment the tool runs and selects the section of stream within the map for just one set of starting points, but if I try and append the selection in the stand-alone script it doesn't recognize the selection and appends the entire layer. My thought was to have it iterate thru the points and append each path to an overall output layer of all paths. I'm using Pro 3.0.3 Thanks, Kathy
... View more
01-05-2024
04:03 PM
|
0
|
1
|
264
|
POST
|
Update: When I add the vector tile to ArcGIS Pro using the Catalog Pan -> 'Portal' -> My Content (AGOL) the vector tile layer looks the same as it does in AGOL. I had been adding the AGOL url in ArcGIS Pro ->Add Data ->Data from Path. In using the url I had the color differences. I'm so excited this will work thru the Catalog Pane...there is hope. Hi @tnguyen , I was using the ArcGIS Vector Tile Style Editor available thru the ArcGIS Developers dashboard in the link you shared above. I was able to turn labels off for certain features like rivers, but my issue is when I save the basemap to my AGOL folder I am seeing differences in how the vector basemap looks in AGOL Map Viewer compared to opening in ArcGIS Pro for the overall colors? I am trying to create a poster with a topo background, but I need to adjust the fonts to better align at a poster size. Anyone experience the same with customized basemap looking so different in ArcGIS Pro? Any work arounds? @BernSzukalski Thanks in advance, Kathy AGOL customized basemap colors as expected ArcGIS Pro customized basemap colors not as expected
... View more
12-06-2023
01:02 PM
|
0
|
0
|
204
|
IDEA
|
Hi, The dashboard reset toggle that was added in 2022 and is a great enhancement to the dashboard functionality/ease of use. I have a dashboard under review currently and numerous requests have asked for the reset to be moved elsewhere in the dashboard. Currently you can only enable the reset option, but functionality to allow placement of the reset in different locations with the dashboard would be valuable in dashboard design. Comments regarding the reset position being too low and thoughts it could be hidden on some monitors. The idea to have placement closer to dashboard selectors could make it more intuitive for users. Thanks for the consideration, Kathy
... View more
12-05-2023
05:20 PM
|
1
|
0
|
293
|
Title | Kudos | Posted |
---|---|---|
2 | 03-19-2024 09:57 AM | |
2 | 03-14-2024 03:22 PM | |
1 | 03-25-2024 08:58 AM | |
1 | 03-23-2024 12:55 PM | |
1 | 03-18-2024 07:19 PM |
Online Status |
Offline
|
Date Last Visited |
a week ago
|