|
POST
|
I am using ArcGIS Python Notebooks on AGOL to summarize some stats regarding groups in our organization and I am getting the following error message: You do not have permissions to access this resource or perform this operation. (Error Code: 403)
Here is the code:
import pandas as pd
cols=['Group ID','Group Name','Number of Users','Creator Licenses','Other Licenses']
df = pd.DataFrame(columns=cols)
groups=gis.groups.search()
i=0
for group in groups:
item={}
print(group)
response = group.get_members()
num_users=0
creator_num=0
noncreator_num=0
num_items=0
num_maps=0
num_forms=0 #()
num_tpk=0 #()
num_wms=0 #()
num_dashboard=0 #()
num_webapp=0 #()
num_sm=0 #()
for group_items in group.content(max_items=10000000):
num_items=num_items+1
item_type=group_items.type
if (item_type=='Web Map'):
num_maps=num_maps+1
if (item_type=='Form'):
num_forms=num_forms+1
if (item_type=='Tile Package'):
num_tpk=num_tpk+1
if (item_type=='Map Service'):
num_wms=num_wms+1
if (item_type=='Map ServiceDashboard'):
num_dashboard=num_dashboard+1
if (item_type=='Web Mapping Application'):
num_webapp=num_webapp+1
if (item_type=='StoryMap'):
num_sm=num_sm+1
for user in response['users']:
num_users=num_users+1
user_obj=gis.users.get(username=user)
print(user_obj)
try:
user_types=user_obj.user_types()
#items=user_obj.items(folder=None, max_items=1000000)
if (user_types['name']=='Creator'):
creator_num=creator_num+1
else:
noncreator_num=noncreator_num+1
item={'Group Name':group.title,'Number of Users':num_users,'Group ID':group.groupid,'Creator Licenses':creator_num,'Other Licenses':noncreator_num,'Number of Items':num_items,
'Number of Web Maps':num_maps,'Number of Forms':num_forms,'Number of Tile Packages':num_tpk,'Number of Map Services':num_wms,'Number of Dashboards':num_dashboard,
'Number of Web Apps':num_webapp,'Number of Story Maps':num_sm}
df=df.append(item,ignore_index=True)
i=i+1
#print(i)
df The error is showing up when I reach a certain user which happens to be from another organization (our Hub organization) so perhaps this the underlying problem. Is there a way to mitigate this?
... View more
10-30-2020
07:17 AM
|
0
|
4
|
6776
|
|
POST
|
Facing the same issue but not seeing any of these options when opening the NVIDIA Control Panel. Hardware Specs: NVIDIA:
... View more
09-17-2020
08:27 AM
|
0
|
3
|
4684
|
|
POST
|
I have a table with several rows of data for each month of the year and I want to display it in the dashboard giving the user the option to filter by month. I know there is the data picker but when I try to add it and apply an action it doe snot seem to filter the correct results. Any ideas?
... View more
08-25-2020
01:45 PM
|
0
|
2
|
1194
|
|
POST
|
I have a table with values for multiple projects over several months and I am trying to figure out how to do find trends over time in Insights. Basically I would like to look at each project ID over the course of several months and calculate the rate of change for a certain value. Any pointers?
... View more
08-21-2020
01:12 PM
|
0
|
1
|
827
|
|
POST
|
We have many users which belong to different groups but all belong to our AGOL organization. Sometime, some of the users from one group decide to share items (specifically Survey123 forms) to the whole organization and we need to revert those shares so that those surveys don't show up to users which belong to other groups. Is there a way to restrict the users to share outside of their group?
... View more
08-21-2020
11:21 AM
|
0
|
1
|
822
|
|
POST
|
Has anyone had any experience calculating and presenting Net Promoter Score with dashboards? I have a table with score values (from 1 to 10) and I want to calculate the Net Promoter Score as an indicator
... View more
08-04-2020
07:29 AM
|
1
|
1
|
673
|
|
POST
|
When you create a new survey in Survey123 Connect you have the option to use a survey from a template. How can I add more templates to this list and can I point it to an AGOL group where our organization stores these templates?
... View more
07-24-2020
09:05 AM
|
0
|
1
|
881
|
|
POST
|
I am trying to run a notebook given to me by Esri Support staff (case #02587809) and when I try to run the arcpy.ia.DetectObjectsUsingDeepLearning function I recieve the following error message: Line 1: arcpy.ia.DetectObjectsUsingDeepLearning(imagery, r"C:\Users\Administrator\Documents\ArcGIS\Projects\Haiti_AI\Haiti_AI.gdb\bldg_detected_jupyterGPU_10July2020", r"D:\TrainingData\MaskRCNN_chips\models\Building_footprint_40epochsGPU\Building_footprint_40epochsGPU.emd", "padding 64;batch_size 4;threshold 0.9;return_bboxes False", "NO_NMS", "Confidence", "Class", 0, "PROCESS_AS_MOSAICKED_IMAGE") File c:\program files\arcgis\pro\Resources\arcpy\arcpy\ia\Functions.py, in DetectObjectsUsingDeepLearning: Line 2888: processing_mode) File c:\program files\arcgis\pro\Resources\arcpy\arcpy\sa\Utils.py, in swapper: Line 53: result = wrapper(*args, **kwargs) File c:\program files\arcgis\pro\Resources\arcpy\arcpy\ia\Functions.py, in Wrapper: Line 2877: processing_mode) File c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py, in <lambda>: Line 511: return lambda *args: val(*gp_fixargs(args, True)) ExecuteError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds. Unable to initialize python raster function with scalar arguments. Traceback (most recent call last): File "D:\TrainingData\MaskRCNN_chips\models\Building_footprint_40epochsGPU\ArcGISInstanceDetector.py", line 169, in initialize self.child_instance_detector.initialize(model, model_as_file) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\learn\models\_inferencing\_maskrcnn_inferencing.py", line 158, in initialize self.mask_rcnn = MaskRCNN.from_model(emd_path=model) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\learn\models\_maskrcnn.py", line 215, in from_model data = _EmptyData(path=emd_path.parent.parent, loss_func=None, c=len(class_mapping) + 1, chip_size=emd['ImageHeight']) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\learn\models\_arcgis_model.py", line 60, in __init__ if getattr(arcgis.env, "_processorType", "") == "GPU" and torch.cuda.is_available(): NameError: name 'torch' is not defined Unable to initialize python raster function with scalar arguments. Failed to execute (DetectObjectsUsingDeepLearning).
I have tried various workarounds from similar threads but nothing so far. I am using a g3s.xlarge machine and remote desktop (windows machine) with GPU enabled.
I have verified that the GPU is being used by running:
cudaDevice=torch.cuda.current_device()
print ("GPU-Device: "+str(cudaDevice))
print ("GPU-Device-Info: "+str(torch.cuda.device(cudaDevice)))
print ("GPU-Device-Count: "+str(torch.cuda.device_count()))
print ("GPU-Device-Name: "+str(torch.cuda.get_device_name(cudaDevice)))
print ("GPU-Device-Availability: "+str(torch.cuda.is_available()))
#now some more info
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
print('Using device:', device)
print()
#Additional Info when using cuda
if device.type == 'cuda':
print(torch.cuda.get_device_name(0))
print('Memory Usage:')
print('Allocated:', round(torch.cuda.memory_allocated(0)/1024**3,1), 'GB')
print('Cached: ', round(torch.cuda.memory_cached(0)/1024**3,1), 'GB')
# use this to test: Run code, dont close,
# go to OS and run nvidia-smi to see process runs on GPU
print (torch.rand(3,3).cuda())
os.system('nvidia-smi.exe>c:/temp/log.txt')
with open(r'c:/temp/log.txt', 'r') as f:
print(f.read()) Resulting in: GPU-Device: 0 GPU-Device-Info: <torch.cuda.device object at 0x000002B5B5DCD390> GPU-Device-Count: 1 GPU-Device-Name: Tesla M60 GPU-Device-Availability: True Using device: cuda Tesla M60 Memory Usage: Allocated: 0.0 GB Cached: 0.0 GB tensor([[0.3166, 0.1292, 0.2083], [0.2514, 0.0501, 0.4692], [0.8568, 0.1868, 0.6476]], device='cuda:0')
Any thoughts?
... View more
07-10-2020
01:02 PM
|
0
|
1
|
1962
|
|
POST
|
Robert LeClair I am running into the same issue. I have created training data using the PASCAL Visual Object Classes and still running into this issue...
... View more
06-25-2020
08:24 AM
|
0
|
1
|
3721
|
|
BLOG
|
Bruce, Nearly there - I can now see this option and select it but can't find an option to change the authentication information (app_id and password)..
... View more
05-13-2020
01:12 PM
|
0
|
0
|
10420
|
|
BLOG
|
Thanks Bruce. I added the xml but it has a "password" section there and when I leave it empty I get an error message " Unable to read file 'C:\Users\asafe\Documents\Metrics\portal.xml'. Most likely cause is an incorrect password. Encryption Error: AES Decrypt finalization failed." Thoughts?
... View more
05-13-2020
12:05 PM
|
0
|
0
|
10420
|
|
BLOG
|
Hi, I am trying to follow this workflow but cannot find the "Esri ArcGIS Portal (Template)" option. Do you have this in a file which I can import from?
... View more
05-13-2020
09:02 AM
|
0
|
0
|
10420
|
|
POST
|
Our organization has several partners and some of them collect data in several feature layers. I would like to analyze the data from a single partner which has several datasets or from multiple partners which each have a single dataset but do not see any such option. Would I need to store this data in a single dataset table or can I summarize data from the different datasets in a single workbook?
... View more
01-27-2020
06:03 AM
|
0
|
1
|
895
|
|
POST
|
James Tedrick quick update: we tried to work on another phone and indeed all images are in the "My Survey Attachments" folder as you mention so it looks like my phone configuration has something different which we will need to figure out. FYI - I have an SD card installed and it could be that some of my images are being stored there...
... View more
01-06-2020
01:23 PM
|
0
|
0
|
581
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-23-2020 01:35 PM | |
| 1 | 08-04-2020 07:29 AM | |
| 2 | 05-16-2019 06:23 AM | |
| 2 | 05-16-2019 06:23 AM | |
| 2 | 05-16-2019 06:23 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-10-2020
09:18 AM
|