|
POST
|
Chris, OK, I ran it from the command prompt. It produced a couple errors, however. I'm not sure what the errors mean. C:\Users\jpilbeam>"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" "C:\ServiceSupport\servicefunctions.py"
ERROR: Failed to process service https://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/CitizenProblems_landuse/FeatureServer/0
'FeatureLayer' object has no attribute '_lazy_properties'
ERROR: Failed to process service https://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/CitizenProblems_bb0fbdc850114e6f8c11c32b9768e643/FeatureServer/0
[WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond I have the most current version of Pro-- 2.4.1 I've tried the script in Jupyter Notebook. Notebook doesn't recognize the send_email module. I've opened a new issue about this on the GitHub Crowdsource Reporter repository. ---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-e5be50c48b0c> in <module>
19 # ------------------------------------------------------------------------------
20
---> 21 from send_email import EmailServer
22 import re
23 from datetime import datetime as dt
ModuleNotFoundError: No module named 'send_email'
I've also tried the script in Pro Python console. It doesn't recognize the send_email module either.
... View more
09-30-2019
01:51 PM
|
0
|
6
|
2448
|
|
POST
|
I'm attempting to run a script provided by ESRI that's used by as part of the Citizen Problem Reporter app to send email notifications via python and the Send Emails Tool. I ran it in Jupyter Notebook, but it couldn't find the send_email module. from send_email import EmailServer ModuleNotFoundError: No module named 'send_email' Can I download the module and install it from somewhere?
... View more
09-30-2019
09:32 AM
|
0
|
3
|
5546
|
|
POST
|
When attempting to run the servicefunctions.py file from an IDE (VS Code) the IDE doesn't know the arcgis.gis module. In the IDE, I'm running the correct Python. It's Python 3 from the arcgispro-py3 location. This arcgis.gis module seems to be used in Jupyter Notebook. In the PDF on page 37-8 it mentions running the script using Windows Task Scheduler, but I don't see mentioned what environment to run the script in? So, I'm tying to run it in VS Code and can't. I did complete the preceding step that explains how to set up Send Emails Tool. How can I get the servicefunctions.py script to run?
... View more
09-30-2019
08:37 AM
|
0
|
8
|
2448
|
|
POST
|
I'm not sure if this the right place to post my question. I'm working on a Citizen Problem Reporter app. There's a Geoprocessing tool called Send Emails. I'm stuck on the Send Email Notifications section (pg. 34) question 9, 10: https://www.esri.com/content/dam/esrisites/en-us/media/pdf/learn-arcgis/configuring-citizen-problem-reporter.pdf How do I set this up? I'm able to view/edit the HTML it's referring to. I need help deciphering the two small paragraphs in questions 9 & 10.
... View more
09-27-2019
09:35 AM
|
3
|
8
|
5339
|
|
POST
|
I thought I had everything set up right, but I continually get this error message when submitting my report. Are there any obvious reasons why this is?
... View more
09-23-2019
12:14 PM
|
0
|
3
|
2844
|
|
BLOG
|
Amy, I was wondering where you added your app password? I have gmail and have created an app pasword, but I'm a little confused as to what I should do with it.
... View more
09-13-2019
02:21 PM
|
0
|
0
|
12920
|
|
POST
|
Rachel, Thanks. I went ahead and used a SQL expression to select all the signs that were not 2/7 --> exported them. Then I switched the selection in the attributes so as to only get the 2/7 signs. This I exported. Then I did a Spatial Join on the two feature classes. So, now the only extra fields are for the BackSide. I'll mark your former reply correct!
... View more
08-13-2019
11:44 AM
|
0
|
0
|
11804
|
|
POST
|
Hi Rachel, That was really helpful. Thanks a lot. I was able to create the new feature class with fields for both FrontSide and BackSide. Now I'm trying to figure out how to join this new feature class to all the points with the last digits being anything but 1/6, 2/7. These are the signs that are by themselves (i.e. nothing on the back). I exported the rest of the points to a feature class of its own. I'm thinking this would be a Join Features task, not a Spatial Join?
... View more
08-13-2019
08:18 AM
|
0
|
2
|
11803
|
|
POST
|
Hi Rachel, Thanks for the reply. Scenario 2 is what I'm after more or less. There's a field called "Post_Number" in the attributes, it's 7 digits. When the point/sign has something on back the last digit is either a 2 or a 7. In turn, to indicate the front of the sign the last digit is either a 1 or a 6. For example, this is the same sign as two different points: Is there a way to combine them based on distance while preserving the attributes?
... View more
08-12-2019
08:41 AM
|
0
|
4
|
11803
|
|
POST
|
Hello, I'm wondering how to combine points that are within a small distance from each other, but are from the same feature class. The points represent signs on a road. When the feature was originally created an additional point was created if the sign had something on the back-- so, two points for the same sign. But, the tricky thing is each point was given a unique number. My question is how can I bring these points together and at the same time preserve the attributes? In ArcGIS Pro, I've tried arcpy.MergeLayers_geoanalytics, but that doesn't seem to work because it requires two layers. I've also tried arcpy.Integrate_management, but this treats the points within a specified distance as vertices, and sort of pulls them on top of each other. In this screen shot is an example of two signs with a point for the front of the signs and a point of the backs. I'm looking to combine these somehow?
... View more
08-12-2019
07:35 AM
|
0
|
6
|
12137
|
|
POST
|
Lance, Thanks. I changed the sde variable to a network directory sde connection file: sde = r'\\gisfile\GISstaff\Jared\connectionadmin.sde\gisedit.DBO.dFIRM_2019_Effective' It threw an error: ERROR 000733: Output Feature Class: Same as input Input Features
Failed to execute (CopyFeatures). I wonder if this has to do with env.overwriteOutput not being too reliable. EDIT: That was the wrong dataset name. It should be: sandbox.DBO.dFIRM_2019_Effective I ran it again with this and it gave me the schema lock error: ERROR 000464: Cannot get exclusive schema lock. Either being edited or in use by another application or service.
Failed to execute (CopyFeatures). I have nothing open except for Pyscripter? And nobody in my office is logged in as gisadmin?
... View more
08-07-2019
11:49 AM
|
0
|
1
|
6471
|
|
POST
|
This question is based off of another one I just had. I can't seem to update a feature dataset in a sql server enterprise geodatabase. I have sysadmin user role access to the database. One thing I've tried is copying the path of the connection file from an ArcPro project and using that in the script. This particular script here works perfect if I use it on a file geodatabase inside a folder. Basically, I'm not sure how to connect to the enterprise geodatabase. """
update the feature classes in the feature dataset gisedit.DBO.dFIRM_2019_Effective
from the shapefiles in this directory:
\\gisfile\GISsources\Federal\FEMA\DFIRM\EffectiveProducts\SHP\17197C_WillCo_FIRMdb
"""
import arcpy
from arcpy import env
import os
#shapefile variable
shp = r'\\gisfile\GISsources\Federal\FEMA\DFIRM\
EffectiveProducts\SHP\17197C_WillCo_FIRMdb'
#sde connection file variable
sde = r'C:\Users\jpilbeam\AppData\Local\Temp\ArcGISProTemp11396\
d532de7f-5c8c-43c9-94bc-3cf9407b9505\gissql.sde\dFIRM_2019_Effective'
env.workspace = shp
#populate the fcList
fcList = arcpy.ListFeatureClasses()
env.workspace = sde
env.overwriteOutput = True
#iterate list of shapefiles and copy to sde feature dataset
for shapefile in fcList:
in_shapefile = os.path.join(shp, shapefile)
out_featureclass = os.path.splitext(shapefile)[0]
print('Copying %s to %s' %(in_shapefile, out_featureclass))
arcpy.CopyFeatures_management(in_shapefile, out_featureclass)
##
print("done") Error: Traceback (most recent call last):
File "\\gisfile\GISstaff\Jared\Python Scripts\ArcGISPro\dFIRM.py", line 30, in <module>
arcpy.CopyFeatures_management(in_shapefile, out_featureclass)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 2948, in CopyFeatures
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 2945, in CopyFeatures
retval = convertArcObjectToPythonObject(gp.CopyFeatures_management(*gp_fixargs((in_features, out_feature_class, config_keyword, spatial_grid_1, spatial_grid_2, spatial_grid_3), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 506, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000733: Output Feature Class: Same as input Input Features
Failed to execute (CopyFeatures).
EDIT: I forgot to mention that the shapefiles and the features in the dataset have the same names. I need to update the dataset every month with these shapefiles.
... View more
08-06-2019
12:18 PM
|
0
|
4
|
7364
|
|
POST
|
Lance Cole Right, those paths are set right in my actual code. Here are the files I'm testing on. Ultimately, I'm updating a feature dataset in the sql server database using a sde connection file. Current Code: """
update the feature classes in the feature dataset gisedit.DBO.dFIRM_2019_Effective
from the shapefiles in this directory:
\\gisfile\GISsources\Federal\FEMA\DFIRM\EffectiveProducts\SHP\17197C_WillCo_FIRMdb
"""
import arcpy
from arcpy import env
import os
shp = r'\\gisfile\GISstaff\Jared\Test\shapefiles'
gdb = r'\gisfile\GISstaff\Jared\Test\TestFGDB.gdb\dFIRM_2019_Effective'
env.workspace = shp
fcList = arcpy.ListFeatureClasses()
env.workspace = gdb
env.overwriteOutput = True
for shapefile in fcList:
print(shapefile)
in_shapefile = os.path.join(shp, shapefile)
print(in_shapefile)
out_featureclass = os.path.splitext(shapefile)[0]
print(out_featureclass, "\n")
print('Copying %s to %s' %(in_shapefile, out_featureclass))
arcpy.CopyFeatures_management(in_shapefile, out_featureclass)
##
print("done")
... View more
08-02-2019
08:17 AM
|
0
|
1
|
6312
|
|
POST
|
Lance, The CopyFeatures function failed: ERROR 000733: Output Feature Class: Same as input Input Features
Failed to execute (CopyFeatures). There were no errors up to that point. The print statement on your line 17 printed this: Copying pathto\Test\shapefiles\S_BASE_INDEX.shp to S_BASE_INDEX Apparently, it doesn't like that the shapefiles and the feature classes have the same names.
... View more
08-02-2019
07:11 AM
|
0
|
3
|
6312
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 05-04-2026 08:45 AM | |
| 1 | 04-20-2026 01:20 PM | |
| 1 | 07-24-2025 01:27 PM | |
| 1 | 11-13-2025 08:22 AM |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|