POST
|
Very delayed response here, but here's an update: Didn't end up finding an option to disable forced reload of modules for the versions of software I had installed - so I followed Dan Patterson's tips for cloning in Pro and installing Spyder (can all be accessed from here). Even without changing that setting, the speed was immediately much faster than what I had been seeing - so importing arcpy was not the culprit after all... Went back to a couple of the other programs to review again and found: In PyCharm (2018.3.7), sys is imported each run before the .py file is run, which takes a few extra seconds before the script actually runs. There may be some way around this, not sure. Once the script runs however, re-entering runfile('yourscript', wdir='yourprojectdir') within the same tab executes immediately, even after modifying. In Visual Studio Code (1.41.0), choosing Run Code would always run with 2.7 as the interpreter, even though the path to Python was set as 3.6.8 (and displayed as such in bottom left of screen). Choosing to Run Python File In Terminal instead would run with 3.6.8, and much faster. Potentially another settings issue somewhere. Learned that setting up Sublime Text (3.2.2) to work with more than one interpreter is not nearly as easy as any of the others, so I've held off for now. The conclusion is that I have at least three modern options now that feel as quick, or nearly as quick as what I had experienced with PythonWin in the past, which is what I was after. And as it stands today, Spyder is the front-runner in my case since it will not require any further investigation to run my scripts in a manner I'm familiar with.
... View more
12-15-2019
11:15 AM
|
2
|
0
|
758
|
POST
|
Thank you Dan, very much appreciated! Will report back after further review, any testing.
... View more
10-27-2019
03:22 PM
|
0
|
0
|
758
|
POST
|
Wanted to ask if anyone else has experienced this, or could provide any insight or ideas. I'd used PythonWin for scripting with arcpy in the past, and it seemed quick and light, no real issues. On and off over the last year or so I've experimented with other more modern IDEs / editors with more bells and whistles, but I've noticed that my scripts take longer to run in every other program... In PythonWin, usually the first run of a .py file takes a few extra seconds, I'm guessing when importing arcpy - but subsequent runs are usually very quick. In the other programs I've tried to-date, each run takes nearly as long as the first, usually adding anywhere from ~10 to 20sec when compared to PythonWin. For example, in PythonWin, a first run might take ~12sec to run, but subsequent runs are under a second. In the others, time elapsed would always be close to the first run time taken. I've observed this behavior in Visual Studio Code, Sublime Text, PyCharm (and I believe Spyder a while back too). I really like at least some features available in each of the programs listed, and the extra time is not a deal-breaker, just bothersome. Would this have something to do with how the programs themselves run, or is something else more likely, such as configuration, or install locations, etc.? I do see that PythonWin is installed in C:\Python27\ArcGIS10.6\Lib\site-packages, so maybe that is part of the answer... PythonWin running 2.7, other programs 2.7 or 3.6 (same running time issue observed in 3.6) Thanks Paul
... View more
10-27-2019
12:08 PM
|
0
|
3
|
896
|
IDEA
|
I've seen a couple of questions similar to this, but didn't catch any ideas when searching. I can setup an attribute field on the fly to read an Arcade expression, and in Web AppBuilder can even export the attribute table containing the Arcade-derived values as .csv (NICE!). But might also be nice to have the option to save that info to the layer itself. A "Save Expression Results as Attribute" action or similar that converts the expression results to a new static attribute. Anyone else have use for this? Paul
... View more
02-27-2019
12:58 PM
|
12
|
1
|
963
|
POST
|
Indeed that was it. I must have bumped that bit in at some point without realizing it and was looking at everything but that. Thanks again, much appreciated.
... View more
02-25-2019
07:04 PM
|
0
|
0
|
827
|
POST
|
Thanks for the second set of eyes Joshua. I bet you're right, will give it a shot this evening. Not sure but it may have been like this yet still running against the file gdb...will look at that as well.
... View more
02-25-2019
12:18 PM
|
0
|
0
|
827
|
POST
|
I have a script that has worked without issues when running against a file gdb, but am struggling to understand why it is not compatible as is for use with SQL gdb. The error I get is ...line 31, in <module> cursor.updateRow(row) NameError: name 'cursor' is not defined # Import system modules
import arcpy
from arcpy import env
# Set workspace and declare variables
workspace = env.workspace = r'Database Connections\mysql.default.sde'
fc = 'Ramps_Copy'
fields = ['BusStopsValue', 'City_and_PubValue', 'Commercial_ZoningValue', 'MedicalValue',
'Parks_RecValue', 'SchoolsValue', 'Social_ServValue', 'Ped_CollisionsValue']
# Start edit session
edit = arcpy.da.Editor(workspace)
edit.startEditing(False, True)
edit.startOperation()
# Set values to update
with arcpy.da.UpdateCursor(fc, fields) as cursor:
for row in cursor:
# Assign values to categories
row[0] = arcpy.GetParameterAsText(0) # Bus Stops
row[1] = arcpy.GetParameterAsText(1) # City & Public Facilities
row[2] = arcpy.GetParameterAsText(2) # Commercial Zoning
row[3] = arcpy.GetParameterAsText(3) # Medical Facilities
row[4] = arcpy.GetParameterAsText(4) # Parks & Rec
row[5] = arcpy.GetParameterAsText(5) # Schools
row[6] = arcpy.GetParameterAsText(6) # Social Services
row[7] = arcpy.GetParameterAsText(7) # Pedestrian-Related Collisions
cursor.updateRow(row)
# Cleanup
del row
del cursor
# Stop edit sesion
edit.stopOperation()
edit.stopEditing(True)
Any thoughts? Paul
... View more
02-25-2019
06:38 AM
|
0
|
3
|
941
|
POST
|
Its been some time since this was a regular workflow for me. Thanks for sharing the info you found - glad it worked out for you!
... View more
01-15-2019
12:30 PM
|
1
|
0
|
440
|
POST
|
Yes that was the cause - I did not realize that Community Analyst was pulling basemaps from the ArcGIS Online organization. Also learned that vector basemaps are not yet supported in Community Analyst/Business Analyst yet, but is currently in the works.
... View more
10-12-2017
07:01 AM
|
0
|
0
|
362
|
POST
|
Support is still checking on a couple of things for this yet but what we think we've found is that the ArcGIS Online organization tied to the account had a custom set of basemaps which was made up of vector basemaps as opposed to the ESRI default basemaps. The issue seems to be related to at least some of those non-default basemaps.
... View more
10-09-2017
02:27 PM
|
0
|
2
|
2332
|
POST
|
Will do Anna, thanks again for checking into this. I'll try to get with support later this week and will post the results.
... View more
09-26-2017
01:08 PM
|
0
|
4
|
2332
|
POST
|
Anna, I ran some additional tests from a separate location, PC and even Firefox to see if there was any difference, but was getting the same result initially. I thought it could possibly have someting to do with the infographic being custom - but the map within the Demographic Summary infographic template (Dark Gray basemap) also would not appear on export. I would however like to revise my answer to number 2 above as I realized the infographic did not depend on the map viewer. When I modified the custom infographic to display either Topographic or Imagery Hybrid basemaps they "stuck" on an export. So it seems that some basemaps have no issue but some do (including Light & Dark Grey) from what I'm seeing. Luckily in my case credits are not a concern so I can burn them on incomplete exports, but I can see it being a concern for some users. Anyone else experiencing this? Thanks
... View more
09-23-2017
06:13 AM
|
0
|
0
|
2332
|
POST
|
Thanks for the response Anna, below are answers to your questions: 1. Yes, Washington, IL 2. I tried at least Topographic and Light Gray base maps 3. Same problem with Image, but had not tried Dynamic HTML
... View more
09-22-2017
08:17 AM
|
0
|
0
|
2332
|
POST
|
When I add a map as part of a custom infographic it displays in-browser, but on export to .pdf the basemap is missing and makes that panel unusable (no frame of reference) : Any ideas? I've tried Chrome and Edge. Thanks Paul
... View more
09-19-2017
08:30 AM
|
0
|
10
|
6012
|
POST
|
Kelly, Unfortunately that one is not public, and the only other layer I can think of with this issue (that has not been discarded) does not have 100% at any level, so that might include your suggestion above... I can reply here next time I see this but don't really have a time-frame. Surprised no one else had this question. Thanks
... View more
07-20-2017
11:56 AM
|
0
|
0
|
2770
|
Title | Kudos | Posted |
---|---|---|
1 | 02-21-2017 06:22 AM | |
1 | 12-14-2014 05:20 PM | |
1 | 06-29-2017 11:10 AM | |
1 | 06-29-2017 02:36 PM | |
12 | 02-27-2019 12:58 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|