POST
|
Hi - We had a couple of times where our user credit default assignment in ArcGIS Online wasn't able to be applied to new users because we were temporarily out of credits. Therefore, they got assigned the maximum, instead of our default allocation. We have over 1400 users in ArcGIS Online, and this has happened a few times (so in the neighborhood if hundreds of users with the wrong credit amount). I tried writing a loop to see if users had unlimited credits, but that doesn't appear to be working. I can report the number of credits a user has assigned to them but I don't see a way to check the current allocation? I used example code to try and figure this out, but I couldn't find anything in the documentation about what I am trying to do? Here is my example: from arcgis.gis import GIS gis = GIS("https://*.maps.arcgis.com", "userid", "pwd") gis.admin.credits.credits gis.admin.credits.is_enabled cm = gis.admin.credits and here is the loop I tired, as you can see it is incomplete because it doesn't work and I can't find what I need to solve it. source_users = gis.users.search('!esri_ & !admin') for user in source_users: if cm.??? == -1: #print(user.username + "\t:\t" + str(user.availableCredits)) cm.allocate(user,10) cm Nothing is returned, but where I have the question marks are what I know is incorrect. Anyone have any insight on this?
... View more
04-16-2021
08:52 AM
|
0
|
2
|
1376
|
POST
|
@HenryLindemann I had no idea what that module was, but that was the ticket. Thank, this has been driving me nuts!
... View more
04-03-2021
06:50 AM
|
0
|
0
|
1281
|
POST
|
I have a new laptop and I am able to run code in Visual Studio for managing our environment (Portal/AGOL) that someone else wrote and debugged, but when I attempt to debug it I get a bunch of Visual Studio python based errors. I have searched to try and figure out where the problem is, but maybe the issue is I am not that good with the IDE and I don't have the Python parts configured correctly? I am not sure where to look to fix this? Here is what I get in the output window, there are more errors after these but it appears they are cascading from this error? My global default Python environment is set to 3.6 as that is where I have the ArcGIS module installed in my solution. Traceback (most recent call last): File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\terminado\management.py", line 23, in <module> from ptyprocess import PtyProcessUnicode ModuleNotFoundError : No module named 'ptyprocess'
... View more
04-02-2021
10:45 AM
|
0
|
3
|
1401
|
POST
|
Hi - We are working on deploying a new architecture for our Portal, and I am wondering if anyone has worked with any Third Party Loading testing tools to verify the architecture or may have suggestion as to how to do so? I can imagine custom Python code could be developed using the ArcGIS API For Python, but I was just wondering if anyone had any experience with other tools that worked?
... View more
03-01-2021
08:25 AM
|
0
|
1
|
783
|
POST
|
Hi - My GIS Server site (non Portal) has a lot of services and folders. I am trying to generate an output listing of the server because I am migrating to a new server. This inventory will help me figure out what I need to move to the new environment. The script came from here: Example: Write properties of all services to a CSV file—ArcGIS Server | Documentation for ArcGIS Enterprise But when it is trying to write the output to CSV, I am getting the following error message: line 373, in main ln = str(jsonOBJ["serviceName"]) + "," + folder + "," + str(item["type"]) + "," + jsonOBJStatus['realTimeState'] + "," + str(jsonOBJ["minInstancesPerNode"]) + "," + str(jsonOBJ["maxInstancesPerNode"]) + "," + "NA" + "," + "NA" + "," + "NA" + "," + str(jsonOBJ["properties"]["maxRecordCount"]) + "," + str(jsonOBJ["clusterName"]) + "," + "NA" + "," + "NA" + "," + str(jsonOBJ["properties"]["outputDir"]) +"\n" KeyError: 'maxRecordCount' It looks to me like this error is from the Service Properties for MaxRecourds, defined under the service parameters, but I am not sure. I still working on it, but if anyone has any insight that would be great.
... View more
10-30-2020
02:00 PM
|
0
|
2
|
853
|
POST
|
Hi Josh - I forgot to respond to this message, but wanted you to know this worked like a charm. I appreciate the help. I ran it before (when you responded) and was just running it again when I remembered I hadn't responded. Joe
... View more
08-13-2020
09:28 AM
|
0
|
0
|
2823
|
IDEA
|
Currently the License Manager extension for ArcGIS Monitor gives an excel report but some of the information is incomplete. For example, there are times when based on the users use behavior a license is activated by someone who already has the main product in use. In the License Manager report, we get this back as 'ACTIVATED-LICENSE(S)', but in the License Server Administrator there is more information like machine name. For our large organization we can link usage information back to a user by not only the ID collected in ArcGIS Monitor, but also the machine name. This helps us to better understand overall consumption. The other request would be to see if any information can be added for duration of use from the License Server Administrator and then add that to the report output. For example, my team uses the LicenseUserNames tab from the report to figure out who is using the licenses globally, but what we can't tell is how long they used them for or when? All we can tell from that tab is that during the reporting period the user used the software at least once, and we have our reports generated weekly. Even having the date/time stamp for each user on that tab would help us to know how many times during the week the user used the software. #arcgismonitor
... View more
07-07-2020
10:45 AM
|
27
|
1
|
1081
|
POST
|
OK so after resetting my ArcGIS Pro back to the default Python and rebooting my machine, my Visual Studios is able to update the Python packages.
... View more
05-20-2020
07:33 AM
|
0
|
1
|
2158
|
POST
|
OK that worked to reset ArcGIS Pro, but my Visual Studio Python packages still won't update and I get the same error. So it must be something else. Thanks for the help.
... View more
05-19-2020
12:15 PM
|
0
|
1
|
2158
|
POST
|
I did some training for the Spatial Data Science MOOC and in it they had us do some work with the deep learning modules. Anyhow, now my default python environment for Python is set to this cloned environment and I don't understand how to set it back to the default? I need the default since I am using it with Visual Studio for another application and I need to update modules including the arcgis module. I am guessing that is the problem. When I try to make the updates in VS I get the following errors: ----- Installing 'arcgis' ----- Traceback (most recent call last): File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\__main__.py", line 16, in <module> from pip._internal import main as _main # isort:skip # noqa File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\__init__.py", line 40, in <module> from pip._internal.cli.autocompletion import autocomplete File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\cli\autocompletion.py", line 8, in <module> from pip._internal.cli.main_parser import create_main_parser File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\cli\main_parser.py", line 11, in <module> from pip._internal.commands import ( File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\commands\__init__.py", line 6, in <module> from pip._internal.commands.completion import CompletionCommand File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\commands\completion.py", line 6, in <module> from pip._internal.cli.base_command import Command File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pip\_internal\cli\base_command.py", line 26, in <module> from pip._internal.index import PackageFinder ImportError: cannot import name 'PackageFinder' ----- Failed to install 'arcgis' -----
... View more
05-19-2020
10:22 AM
|
0
|
5
|
2265
|
POST
|
My company has a training site for the Esri training that is ArcGIS Online based, but isn't attached to our Organization account. One of our developers generated a list of users for me from the site using Python and I have taken that list and compared it to our HR Database to find users who have left the company (over 1000 of them). I have exported that list into a comma separated file by email address. We are using SAML for authentication. Now, what I would like to do is to use Jupyter Notebooks to learn how to properly use the Python API for ArcGIS to remove these users. I am out of touch with writing code so that is why I am trying to relearn using Jupyter. I reviewed this site for other users who are trying to remove users from ArcGIS Online, but my site is more simple, the accounts only have access to the training, no content. To remove them, I want to connect to the site, import the CSV file I have, loop through the file and delete the users. This is my code so far, I know it isn't working because the users are still on the site, so I am aware I am missing proper execution. from arcgis.gis import GIS import csv gis = GIS("https://****.maps.arcgis.com", "****", "***") csvPath = r'Myfile path' userDelete[] ^^^^^ This code below I copied from another post^^^ with open(csvPath) as f_input: csv_input = csv.reader(f_input, delimiter=",") for row in csv_input: users = gis.users.search("username:{}".format(row[0])) if (len(users)>0): # only append if there are search results userDelete.append(users[0]) As a novice any help in understanding what I need to do to make this work would be appreciated. I want to be more self sufficient with working with Python like this and since I don't code everyday, that takes a lot of relearning. Thanks.
... View more
01-31-2020
02:13 PM
|
0
|
3
|
2932
|
POST
|
Hi - I need to restore my webgisdr backup to a new server that was configured with the same DNS name on a different network. I am trying to simulate my production environment to test a patch Esri development has given me on this test environment. The documentation for the restore process isn't very specific when it comes to the correct parameters if you are using AWS S3 storage for your backup. It mentions how the restore needs the shared location, but is that still true under AWS and S3? If so, they are on different networks, and the sahred location doesn't have anything in it pertaining to our webgisdr backup? https://enterprise.arcgis.com/en/portal/latest/administer/windows/restore-web-gis.htm Can someone please clarify what is needed if you are using webgisdr in AWS S3 and not on a file system? The document aslo mentions that the domain account that runs the backup should have access to the location, we are not on a domain?
... View more
06-28-2019
02:04 PM
|
1
|
1
|
1007
|
DOC
|
Jonathan - Going through this right now myself. Looking at your script, does it require that the database connections already be present before looping through the input folder? Joe
... View more
03-20-2019
07:51 PM
|
0
|
0
|
1117
|
Title | Kudos | Posted |
---|---|---|
1 | 06-28-2019 02:04 PM | |
27 | 07-07-2020 10:45 AM | |
1 | 12-27-2018 02:54 PM | |
1 | 12-19-2018 02:24 PM | |
1 | 01-10-2019 01:07 PM |
Online Status |
Offline
|
Date Last Visited |
03-15-2022
09:37 AM
|