|
POST
|
Another update: I modified the script to also include: import arcgis
print("arcgis API is version {0}".format(arcgis.__version__)) So I can confirm that no matter how the script is called, the correct/latest version of the arcgis API is indeed being used.
... View more
09-28-2022
05:19 AM
|
0
|
0
|
4128
|
|
POST
|
I trimmed down the code significantly should anyone want to try to reproduce. I have also reproduced with with a built-in admin account as well as a domain user account with the Admin role in Enterprise. I have reproduced this from multiple environments.
... View more
09-27-2022
09:36 AM
|
0
|
0
|
4149
|
|
POST
|
the following code produces the error: AttributeError: 'GIS' object has no attribute 'admin' but only in a stand alone script executed from the command line. The identical code works fine in Jupyter lab as well as the Python window in Pro. Trimmed down the code in case anyone wants to attempt to replicate on their end. #Import Modules
from arcgis.gis import GIS
##Log into Enterprise
gis1 = GIS("https://website.com/portal", username = "user@company.com", password = "password", verify_cert=False)
print("Logged in as: " + gis1.properties.user.username)
#Create server object
gis_servers=gis1.admin.servers.list()
server1 = gis_servers[0] Fails at line 9. The user is an administrator. Additional Details: ArcGIS Pro 3.0.2 using a cloned environment ArcGIS API version 2.0.1 Behavior is the same whether I run via python.exe or propy.bat I use stand alone scripts along with task scheduler all the time Modifications to the OS System Environment Variables does not fix this Other Observations (potential red herring though): This has all been ruled out as I can reproduce in multiple environments (completely different devices/workstations). setting the 'path' system variable to the current cloned environment location and then typing 'python' in PowerShell yields the following warning: but lists the correct version of the arcgis module. The same AttributeError is returned in this configuration. The same Attribute Error is returned if the path system variable is set to the default Python environment as well. Switching the environments in ArcGIS Pro does not change the results. using the ProPy.bat from PowerShell does launch a Python command line without the activation warning shown above.
... View more
09-26-2022
11:04 AM
|
0
|
7
|
4201
|
|
POST
|
Not really sure how best to title this, sorry. Using the Python API guide as a follow-along for 'managing your gis servers' The query itself is working but seems to be ignoring the time filter: comparing to the GUI in Sever Manager I'm not lining up these times with anything. I can supply any argument I want for start_time and no error is returned: If I leave out the 'start_time' parameter entirely, the query returns exactly what I'm seeing in the Server Manager GUI exactly. I'm I using start_time wrong? (Or is my understanding of it incorrect?)
... View more
09-21-2022
11:56 AM
|
0
|
2
|
1590
|
|
POST
|
Not really sure how best to title this, sorry. Using the Python API guide as a follow-along for 'managing your gis servers' The query itself is working but seems to be ignoring the time filter: comparing to the GUI in Sever Manager I'm not lining up these times with anything. I can supply any argument I want for start_time and no error is returned: If I leave out the 'start_time' parameter entirely, the query returns exactly what I'm seeing in the Server Manager GUI exactly. I'm I using start_time wrong? (Or is my understanding of it incorrect?)
... View more
09-19-2022
11:44 AM
|
0
|
0
|
599
|
|
POST
|
Thanks Sean. I'm going to mark this as the solution and have a takeaway of 'its complicated...', hah! So I have been looking into Azure Functions but never at this depth. My next concern is what Python environment is available in Azure and what Python library's can be used (like the ArcGIS Python API) itself. Thanks for the detail response. Z
... View more
09-15-2022
10:29 AM
|
1
|
1
|
1674
|
|
POST
|
Thanks Sean. I'm going to mark this as the solution and have a takeaway of 'its complicated...', hah! So I have been looking into Azure Functions but never at this depth. My next concern is what Python environment is available in Azure and what Python library's can be used (like the ArcGIS Python API) itself. Thanks for the detail response. Z
... View more
09-15-2022
10:28 AM
|
0
|
0
|
1886
|
|
POST
|
I still don't know the best place to post this, but since the code uses the Python API, I figured I'd try here as well: So, I've been using the Python API guide to build some basic code around pulling Portal/Server logs. My goal eventual goal here is to push notifications for greater visibility when things are going wrong (rather than having to log into Server Manager and query logs manually). The code works as expected, but now the challenge is where & how to execute. I really don't want this to just run locally, with say Microsoft Task Scheduler. On other hand, I'm not sure if Power Automate offers any ability to execute Python code. Has anyone else crafted a similar solution for pushing Server/Portal logs?
... View more
09-15-2022
06:36 AM
|
1
|
2
|
1927
|
|
POST
|
It's hard to know where to post this question. I really like Power Automate because I can integrate processes within our o365 environment so easily. But I'm not sure how to go about this. So, I've been using the Python API guide to build some basic code around pulling Portal/Server logs. My goal eventual goal here is to push notifications for greater visibility when things are going wrong (rather than having to log into Server Manager and query logs manually). The code works as expected, but now the challenge is where & how to execute. I really don't want this to just run locally, with say Microsoft Task Scheduler. On other hand, I'm not sure if Power Automate offers any ability to execute Python code. Has anyone else crafted a similar solution for pushing Server/Portal logs?
... View more
09-15-2022
06:33 AM
|
0
|
3
|
1723
|
|
POST
|
[I've note found a way to cross post threads in Geonet, but I may also post this in the Python API section as well.] So, I've been using the Python API guide to build some basic code around pulling Portal/Server logs. My goal eventual goal here is to push notifications for greater visibility when things are going wrong (rather than having to log into Server Manager and query logs manually). The code works as expected, but now the challenge is where & how to execute. I really don't want this to just run locally, with say Microsoft Task Scheduler. On other hand, I'm not sure if Power Automate offers any ability to execute Python code. Has anyone else crafted a similar solution for pushing Server/Portal logs?
... View more
09-15-2022
06:31 AM
|
0
|
1
|
711
|
|
POST
|
Update on further testing: I also tried adding the the tool as a portal item to the widget, but the behavior remains the same. Curiously, if I browse to the service URL, under the parameter listings for the parameter which reference the field mentioned above, there is a snap shot of the choice list and it is an incomplete list.
... View more
09-01-2022
05:42 AM
|
0
|
0
|
921
|
|
POST
|
Why would the behavior be different when consuming the published GP tool in Pro and Map Viewer then? This only occurs with the GP Widget in App builder....
... View more
08-31-2022
01:54 PM
|
0
|
0
|
930
|
|
POST
|
I have a GP widget published to our Enterprise environment. There is a parameter exposed for user-input from a field within a feature class. When using this GP tool in Pro, all records from this field are available in the choice list. When using this GP tool as an Analysis tool in Map Viewer, all records from this field are available in the choice list. When using this GP tool via the Geoprocessing widget in Web AppBuilder, only a limited list of records are available in the choice list. This list does not appear to be cut-off at some point say alphabetically or anything. Why doesn't the GP widget poll/return all available records in the field?
... View more
08-31-2022
12:45 PM
|
0
|
3
|
971
|
|
POST
|
I'm a bit at a loss for words as to why there wouldn't be parity in Map Viewer and Web App Builder for browsing Living Atlas content. Both are built-in application resources in Enterprise & AGO deployments alike (which are both in-turn directly tied to Living Atlas). Could you please offer Esri's perspective on this here?
... View more
08-19-2022
11:02 AM
|
0
|
0
|
1726
|
|
POST
|
Hi Kaitlyn, The difference here is that users cannot browse the content like they can in the Map Viewer. They would somehow have to know the URL. Why can users browse Living Atlas content in the Map Viewer but cannot browse Living Atlas content via Add Data widget in the Web AppBuilder web app?
... View more
08-19-2022
08:05 AM
|
0
|
2
|
1737
|
| Title | Kudos | Posted |
|---|---|---|
| 9 | 03-24-2026 11:41 AM | |
| 1 | 11-06-2024 06:58 AM | |
| 1 | 12-16-2022 07:01 AM | |
| 1 | 08-09-2024 06:55 AM | |
| 1 | 08-13-2024 05:58 PM |
| Online Status |
Offline
|
| Date Last Visited |
03-24-2026
12:51 PM
|