|
DOC
|
I received the following error when saving a WAB 2.4 app. I was trying to use a custom icon for the widget: Failed to save the app: ENOENT: no such file or directory, open 'C:\WebAppBuilderForArcGIS\server\apps\2\configs\eLocate\icon_Lat\Long Search.png'
... View more
08-28-2017
01:02 PM
|
0
|
0
|
7621
|
|
DOC
|
ofrigmops, it would be helpful to add a link to a demo map that has this widget. As a WAB developer, I like to preview a widget in a live map before downloading it. If you can't stand up a demo on our organization's server, you can always use GitHub gh-pages branch to stand up a demo.
... View more
08-28-2017
12:32 PM
|
1
|
0
|
4526
|
|
DOC
|
I ran into a similar problem. Line 57 of the tool's script defines the token generation URL the following way: tokenURL = 'http://' + server + '/arcgis/admin/generateToken'. Our ArcGIS Server was configured differently, so our token generation URL is arcgiswebadaptor/tokens/GenerateToken. Not sure if this is why you're having the issue, but worth checking into.
... View more
07-24-2017
05:18 AM
|
0
|
0
|
11006
|
|
DOC
|
Eric Adolfson, I was able to put the script up on Github. This is an active project at work, so the script may change a bit. My next step is to test with services that are down, and add in logic to e-mail that the service is down. I'm using this script for the update process for a multi-county regional dataset.
... View more
07-10-2017
01:33 PM
|
0
|
0
|
11006
|
|
DOC
|
EA1, I am planning on posting the code to GitHub, after making a few more tweaks. I'll post the link to that repo on this thread. It may be a couple weeks.
... View more
07-10-2017
05:22 AM
|
0
|
0
|
11006
|
|
POST
|
Thanks! Not sure how I missed that. I ended up using a CSS trick to have the list expanded: /* Layer list expanded by default */
.jimu-widget-layerList table.layer-sub-node {
display: table;
}
/* layer list legend hidden so it loads properly */
.jimu-widget-layerList table.layer-sub-node .legends-loading-img {
display: none;
}
... View more
06-19-2017
12:19 PM
|
0
|
3
|
4743
|
|
POST
|
I'm developing a WAB app using Developer edition 2.4. I had a couple questions about the Layer List widget: 1. Is it possible to have the widget open when the map first loads? 2. Is it possible to have a map service containing sub-layers to be expanded by default? I have an image of what I would prefer.
... View more
06-19-2017
08:07 AM
|
0
|
8
|
6720
|
|
POST
|
I had to look up OP to confirm you were referring to me. My scripts bail if there is an error. My scripts are doing things like rebuilding address locators, rebuilding tiles for cached services, running replication, etc. I basically want to know if the task ran successful or not. If it failed, that is okay, I just want to know why it failed.
... View more
06-15-2017
11:50 AM
|
0
|
0
|
2155
|
|
POST
|
The general flow of the scripts are: 1. Import modules 2. Get the current date in the m-d-y format 3. Enter try statement 4. Open log file in write mode 5. Run geoprocessing tool(s) 6. Write results messages to log file 7. Enter except Environment Error statement 8. capture line number of error and error message 9. Write line number and error message to log file 7. Enter except Exception statement 8. capture line number of error and error message 9. Write line number and error message to log file 10. close the log file
... View more
06-14-2017
12:35 PM
|
0
|
0
|
19619
|
|
DOC
|
jskinner-esristaff, Please disregard, I pulled my guns too soon. I left off the '/query' at the end of my baseURL.
... View more
06-14-2017
08:23 AM
|
0
|
0
|
11006
|
|
DOC
|
Jake Skinner, Thanks again for developing this tool. I am working on using your code for a stand-alone script just to extract features from services. I have tested successfully on unsecured ArcGIS Server (10.3.1) services. However, when I tested with a secured service, I am getting an error. It looks like the request is successful and a token is generated, but the error message I'm getting is 'objectIds'. Maybe the data['objectIds'].sort() key should be changed to match what is in my service? I also had to update the token generation URL from the original script. Below are some messages I logged while attempting to make the request: Generating token for service Parameters: {'username': 'SomeUser', 'password': 'CantShare', 'f': 'pjson', 'client': 'requestip'} Request: <urllib2.Request instance at 0x122ED710> Data: {u'token': u'FnGoWx6kQOBa_P-X9E6lve_p0MfoOWI4uHrMeihIASnBIf-Np7ZXar8aw57dzUac', u'expires': 1497456260540L} Token Type is : <type 'unicode'> Token: FnGoWx6kQOBa_P-X9E6lve_p0MfoOWI4uHrMeihIASnBIf-Np7ZXar8aw57dzUac New Parameters: {'token': u'FnGoWx6kQOBa_P-X9E6lve_p0MfoOWI4uHrMeihIASnBIf-Np7ZXar8aw57dzUac', 'returnIdsOnly': 'true', 'where': '1=1', 'f': 'json'} New Data: {u'drawingInfo': {u'labelingInfo': None, u'renderer': {u'symbol': {u'contentType': u'image/png', u'imageData': u'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAFtJREFUOI1jYaAQsDAwMDDU+jNcMNdk+ESKxpPXGfiaNzIYsDAwMDC4GDAI2mkx6JNiAC87w6PmjVAXUAJGDRg1YBAZcPUhAw8nO2karz5k4IEbkLWAQZhcFwAAU4UOOJ0k87cAAAAASUVORK5CYII=', u'url': u'f3b6e42d90b9ace7811063e0f4b7f028', u'height': 12, u'width': 12, u'angle': 0, u'yoffset': 0, u'type': u'esriPMS', u'xoffset': 0}, u'type': u'simple', u'description': u'', u'label': u''}, u'transparency': 0}, u'extent': {u'xmin': 2010428.1978965253, u'ymin': 249956.09646843374, u'ymax': 358567.8215017766, u'xmax': 2220380.042427689, u'spatialReference': {u'wkid': 102729, u'latestWkid': 2272}}, u'canModifyLayer': False, u'advancedQueryCapabilities': {u'supportsQueryWithDistance': True, u'supportsDistinct': True, u'supportsReturningQueryExtent': True, u'supportsStatistics': True, u'supportsPagination': True, u'supportsOrderBy': True, u'supportsTrueCurve': True, u'useStandardizedQueries': True}, u'hasLabels': False, u'subLayers': [], u'supportsAdvancedQueries': True, u'id': 0, u'relationships': [], u'parentLayer': None, u'capabilities': u'Map,Query,Data', u'currentVersion': 10.31, u'geometryType': u'esriGeometryPoint', u'ownershipBasedAccessControlForFeatures': {u'allowOthersToQuery': True}, u'type': u'Feature Layer', u'useStandardizedQueries': True, u'supportedQueryFormats': u'JSON, AMF', u'maxRecordCount': 1000, u'description': u'', u'defaultVisibility': True, u'typeIdField': u'FType', u'minScale': 750000, u'types': [{u'domains': {u'FCode': {u'type': u'inherited'}}, u'id': 730, u'name': u'Education'}], u'displayField': u'Name', u'isDataVersioned': True, u'name': u'Schools', u'supportsStatistics': True, u'hasAttachments': False, u'fields': [{u'alias': u'OBJECTID', u'domain': None, u'type': u'esriFieldTypeOID', u'name': u'OBJECTID'}, {u'alias': u'Name', u'length': 255, u'type': u'esriFieldTypeString', u'name': u'Name', u'domain': None}, {u'alias': u'Owner', u'length': 50, u'type': u'esriFieldTypeString', u'name': u'Owner', u'domain': None}, {u'alias': u'Address1', u'length': 50, u'type': u'esriFieldTypeString', u'name': u'Address1', u'domain': None}, {u'alias': u'City', u'length': 50, u'type': u'esriFieldTypeString', u'name': u'City', u'domain': None}, {u'alias': u'State', u'length': 2, u'type': u'esriFieldTypeString', u'name': u'State', u'domain': None}, {u'alias': u'Zip', u'length': 10, u'type': u'esriFieldTypeString', u'name': u'Zip', u'domain': None}, {u'alias': u'PocName', u'length': 50, u'type': u'esriFieldTypeString', u'name': u'PocName', u'domain': None}, {u'alias': u'PocOrganization', u'length': 50, u'type': u'esriFieldTypeString', u'name': u'PocOrganization', u'domain': None}, {u'alias': u'PocTel1', u'length': 25, u'type': u'esriFieldTypeString', u'name': u'PocTel1', u'domain': None}, {u'alias': u'PocEmail', u'length': 50, u'type': u'esriFieldTypeString', u'name': u'PocEmail', u'domain': None}, {u'alias': u'FType', u'domain': None, u'type': u'esriFieldTypeInteger', u'name': u'FType'}, {u'alias': u'FCode', u'domain': {u'codedValues': [{u'code': 73000, u'name': u'Education Facility'}, {u'code': 73002, u'name': u'School'}, {u'code': 73004, u'name': u'School: Middle School'}, {u'code': 73003, u'name': u'School: Elementary'}, {u'code': 73005, u'name': u'School: High School'}, {u'code': 73006, u'name': u'College / University'}, {u'code': 73007, u'name': u'School: Amish'}, {u'code': 73008, u'name': u'School: Mennonite'}], u'type': u'codedValue', u'name': u'Education FCode'}, u'type': u'esriFieldTypeInteger', u'name': u'FCode'}, {u'alias': u'SHAPE', u'domain': None, u'type': u'esriFieldTypeGeometry', u'name': u'SHAPE'}], u'maxScale': 0, u'copyrightText': u'', u'canScaleSymbols': False, u'htmlPopupType': u'esriServerHTMLPopupTypeAsHTMLText'} Error: 'objectIds' URL is incorrect. Or, Service is secure, please enter username and password.
... View more
06-14-2017
08:13 AM
|
0
|
0
|
11006
|
|
POST
|
Am I correct in thinking that using the with keyword, I will need to open the text file in the try statement and any except statements I have?
... View more
06-14-2017
05:17 AM
|
0
|
4
|
19619
|
|
POST
|
I write geoprocessing (Exception) and other (Environment Errors) errors to the text file. The scripts are set as scheduled tasks, so I like to keep tabs on whether they are successful or not.
... View more
06-14-2017
05:15 AM
|
0
|
2
|
19619
|
|
POST
|
I often write the results of geoprocessing scripts to a text file. After doing some research, I learned I'm not using best practices for closing the file. I'm not opening the file using the with keyword, so the file may not close if there is an error. If there is an error, I need to be able to write the error message to the text file. It looks like I could use the finally keyword or with keyword to ensure the file closes. Which of these options is better? And if I've made any errors in how I think I could improve my implementation, please let me know. Thanks! Method #1 try:
# log file to write to
logFile = r'path\tofile\fileName.txt'
# open file in write mode
report = open(logFile, 'w')
# geoprocessing stuff
# write to report
report.write('some message')
except Exception as e:
# get line number and error message
report.write('an error message')
finally:
report.close() Method #2 try:
# log file to write to
logFile = r'path\tofile\fileName.txt'
# open file in write mode
with open(logFile, 'w') as f:
# geoprocessing stuff
# write to report
f.write('some message')
except Exception as e:
# get line number and error message
with open(logFile, 'a') as f:
f.write('an error message')
... View more
06-13-2017
11:36 AM
|
1
|
11
|
46700
|
|
POST
|
I know this is a question I should know the answer too, but wanted to make sure I understand it correctly. If you install ArcGIS Desktop and do not include Python in the installation, how do you install Python after the fact? I need to explain how to install Python with ArcGIS Desktop if it was not installed during the initial install. Thanks, Patrick
... View more
06-10-2017
05:36 PM
|
0
|
1
|
1120
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-19-2020 10:49 AM | |
| 1 | 01-24-2020 06:34 AM | |
| 1 | 05-28-2020 10:49 AM | |
| 1 | 05-19-2020 07:30 AM | |
| 1 | 05-27-2020 10:32 AM |
| Online Status |
Offline
|
| Date Last Visited |
01-13-2021
01:35 PM
|