POST
|
Thanks Josh for the answer. I tried something similar with specifying the layer (trap_count.layers[0]) from using a search to find the service layer (gis.content.search) and it didnt work. Im glad it was an easy fix!
... View more
04-10-2020
09:47 AM
|
0
|
0
|
5452
|
POST
|
Hi everyone, I am trying to create a script to run every night to calculate the total insects counted each day by summing two insect count fields in a feature layer. I can't use Arcade because the layer has "track changes" and "sync" enabled for the field crew (grrrr...). Below is my simple script to calculate the "TotalArmyworms" field based on summing the Western Yellow Armyworm field with the Bertha Armyworm field. I have tried many different ways to identify the layer from AGOL, and each time the error states that 'Item' object has no attribute 'calculate'. Any thoughts? import arcgis
import arcpy
from arcgis.gis import GIS
from arcgis import features
from arcgis.features import FeatureLayer
gis = GIS('https://arcgis.com', 'xxxxxx', 'xxxxxx')
arcpy.env.overwriteOutput = True
trap_count = gis.content.get("b6b9c68fa42b408a88c68aa9e18593d5")
trap_count
trap_count.calculate(where="fid > 0", calc_expression=[{"field": "TotalArmyworms", "sqlExpression" : "Nu_W_YellowStripedArmyworm + Nu_BerthArmyworm" }])
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py in __getattr__(self, name)
6998 try:
-> 6999 return dict.__getitem__(self, name)
7000 except:
KeyError: 'calculate'
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
<ipython-input-50-2608a815f7ee> in <module>
----> 1 trap_count.calculate(where="fid > 0", calc_expression=[{"field": "TotalArmyworms", "sqlExpression" : "Nu_W_YellowStripedArmyworm + Nu_BerthArmyworm" }])
2
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py in __getattr__(self, name)
6999 return dict.__getitem__(self, name)
7000 except:
-> 7001 raise AttributeError("'%s' object has no attribute '%s'" % (type(self).__name__, name))
7002
7003 def __getitem__(self, k): # support item attributes as dictionary keys on this object
AttributeError: 'Item' object has no attribute 'calculate'
1
... View more
04-09-2020
03:58 PM
|
0
|
10
|
6053
|
POST
|
Hi Robert, Thanks for the information. I do have WAB Dev, but am still hosting final WAB webmaps on my AGOL account. I was under the assumption that I could make changes to the widget in the WAB Dev folder on my C drive, save it as a different widget, add the widget to my site in WAB dev, then launch the site from WAB dev? In the near future I will go down the road of setting up AWS to host my site, but that is another can of worms for another day. Thanks, Natalie
... View more
04-03-2020
11:01 AM
|
0
|
1
|
752
|
POST
|
Hello Web Dev community - I have three infographic icons on a header bar. I would like to have the widget icon that is currently open change to a different color so it is more obvious to the general public that you must click on the icon to see the infographic. See the picture below. I am new to website editing, but am good at following directions for where to change lines of code.
... View more
04-01-2020
09:38 AM
|
0
|
3
|
850
|
POST
|
Also - Im assuming this has something to do with coordinate systems since AGOL layers are in WGS 84 and my projection is Wa State Plane South.
... View more
03-20-2020
04:53 PM
|
0
|
0
|
3540
|
POST
|
If I draw a polygon in an ArcGIS Online web map or in ArcPro using an AGOL layer, the default "shape__area" field is off by about a factor of 5. I need to calculate the area (in acres) of field boundaries using the default "shape__area", but dividing by 43560 (sq. ft./ac) does not work. Please see the image below where you can see the default shape__area, manually entered Acres, and measured Area in ArcPro. For some reason, the conversion from shape__area to (manually entered) acres is consistently around 8500.
... View more
03-20-2020
04:43 PM
|
0
|
2
|
3610
|
POST
|
Hi Ben, Thanks so much for the quick reply. I am very much NOT an IT person, so you may need to speak slowly and use small words with me Do I hit F12 from the web browser my client is using? What would an error look like, and how would I go about fixing it? Natalie
... View more
03-17-2020
05:05 PM
|
0
|
2
|
805
|
POST
|
I have a client in a very rural location. He has wifi but it is not great. Many times, he has tried to login to his AGOL account but it fails. I have reset his account and password a few times, but it still happens. Attached is the log from today of his attempted tries. I know he is using the correct username and password. Any help is appreciated. Thanks, natalie
... View more
03-17-2020
01:34 PM
|
0
|
4
|
857
|
POST
|
Im guessing my error has to do with the image below. Jupyter notebook is now linked to "my_arcgispro-py3". Did this happen because of the update? Can I just remove that environment? Im guessing that would mess up other things in ArcPro.
... View more
02-12-2020
10:05 AM
|
0
|
2
|
4491
|
POST
|
Hi Dan, Thanks for the input. I am running Jupyter Notebook 6.0.0 through Anaconda using the "my_arcgispro-py3" Jupyter notebook link. I revised the code per your suggestion and i still get the same error. The code ran fine as it was up until the ArcPro 2.5 update. I updated Jupyter and Spyder both through Anaconda, and Spyder 4.0.0 and 4.0.1 both crash. Do I need to repath Anaconda to a different location where Python is stored? Thanks, Natalie
... View more
02-12-2020
09:54 AM
|
0
|
3
|
4491
|
POST
|
Hi Dan, I get a similar problem when I try to run a script in Jupyter after updating to ArcPro 2.5 and doing your suggested steps to install "Spyder 4.0 --no-pin". from arcgis.gis import *
import os
import getpass
import arcpy
import sys
import IPython
from IPython import display
gis = GIS('https://arcgis.com', 'drycreek_xxx', 'xxxx')
Just running the above code gives me the error: The version of the binaries in the active Python environment do not match the version of the binaries of the ArcGIS Pro application. Active environment path: C:\Users\natb0\AppData\Local\ESRI\conda\envs To create a new environment that is up to date with arcgispro-py3: 1. Generate a list of additional packages installed in your current environment, with the conda command: > conda env export > env.yaml 2. (Optional) If you have additional dependencies installed through pip, find those with pip freeze: > pip freeze > requirements.txt 2. Create a new environment by cloning arcgispro-py3, and activate it: > conda create --clone arcgispro-py3 --name my-env --pinned > activate my-env 3. Add back missing conda packages from your current environment: > conda env update -n my-env -f env.yaml 4. (Optional) Add back missing packages from pip: > pip install -r requirements.txt 5. (Optional) Make it the default for the ArcGIS Pro application and the "Python Command Prompt": > proswap my-env Is this the same problem or a different one from @John Huillery? Any advice is appreciated.
... View more
02-11-2020
04:35 PM
|
0
|
5
|
4491
|
POST
|
Nope. I mean the draw toolbar from ArcMap. Please see the attached picture. You can draw vectors that are not shapefiles, as well as quickly edit text. I use this function to quickly draw lines and polys when I am drafting shapefiles.
... View more
01-28-2020
11:59 AM
|
5
|
0
|
26561
|
POST
|
I have been looking for the Draw toolbar from ArcMap in ArcPro. Am I missing something, or is it not included? I use that toolbar all the time when making maps and graphics.
... View more
01-28-2020
09:27 AM
|
6
|
10
|
27884
|
Title | Kudos | Posted |
---|---|---|
1 | 12-06-2024 10:22 AM | |
1 | 09-11-2024 10:24 AM | |
2 | 09-10-2024 11:16 AM | |
1 | 04-12-2024 09:35 AM | |
4 | 02-24-2024 11:37 AM |
Online Status |
Online
|
Date Last Visited |
6 hours ago
|