I'm writing a Python script that will require access to non-token-based ArcGIS Server services. Looking at the ArcPy documentation, the approach is to use ImportCredentials.
In its simplest form, here's my Python script:
import arcpy
arcpy.ImportCredentials(my_ags_file)
Attempting to lint or run this code in Visual Studio Code results in the error:
Module 'arcpy' has no 'ImportCredentials' member
What am I doing wrong?
Using ArcGIS Pro 2.5.1 and ArcGIS Server 10.8.1
Solved! Go to Solution.
Hi Dan,
Thanks for your reply. Turns out I was just referencing the wrong Python environment.
reportedly 'fixed' but you seem to have a higher server version than indicated in these posts.
Try the salient lines in the python window in Pro or in a Jupyter Notebook in Pro to rule out a VS code issue
BUG-000114121: ArcGIS GIS Server 10.5x and ArcGIS GIS Server 10.6 p..
Hi Dan,
Thanks for your reply. Turns out I was just referencing the wrong Python environment.