|
POST
|
OK Thanks. I will run the custom widget upgrade process just to be through. Can't imagine it will hurt anything.
... View more
01-26-2022
12:08 PM
|
0
|
0
|
1823
|
|
POST
|
Thanks Robert. That makes sense. I think it was the use of "compile" that had me thinking there was more to it. I am still curious on the second part though that talks about upgrading custom widgets and themes. I am not sure what we are achieving by following their import steps.
... View more
01-26-2022
09:35 AM
|
0
|
2
|
1836
|
|
POST
|
Hi. I am looking to upgrade to WABD 2.23 and I am trying to figure out the proper way to do this. The documentation seems somewhat incomplete on this topic. The instructions for upgrading the apps is clear and works fine. Updating custom widgets is where the confusion starts. In one section is states the following: If you have custom widgets and themes in the app that were created in the previous version of Web AppBuilder, the command utility will import them into the new version as well, without automatically checking them. You need to make sure these custom widgets are compiled with the version of ArcGIS API for JavaScript and version of Web AppBuilder to which you import the app. See the version comparison chart. I do not understand what they mean by making sure it is compiled with JS API that matches WAB version. I know 2.23 will use API version 3.39 but I do not see where you are able to change that. I have assumed that the widget will try to use the version that WAB was build from. Any ideas? To add to the confusion there is another part of the documentation that states that custom widgets can be upgraded by WAB. Upgrade custom widgets and themes Although there is no function to upgrade a custom widget and theme directly, you can follow the steps below. I follow the steps which is simply importing a map from old WAB to the new version. It brings the widgets in but I am not seeing changes suggesting there was any "upgrade" that occurred. The manifest on those still show the old version. Does anyone know what this suggested process actually does? I appreciate any help.
... View more
01-26-2022
08:57 AM
|
0
|
4
|
1863
|
|
POST
|
I just figured it out. I was able to just use return to move me back to def main. """
def main():
tbx = Toolbox()
tool = ExposureTool()
tool.execute(tool.getParameterInfo(),None)
if __name__ == '__main__':
main()
"""
... View more
07-14-2021
07:26 AM
|
1
|
0
|
3131
|
|
POST
|
Here is that specific part as the entire code is rather large. What I am trying to do is create a tool that will be published but I do not want people seeing the syntax used for the input. So I need the tool to successfully run by using some placeholder text rather than valid json the tool would need to fully execute. def execute(self, parameters, messages):
"""The source code of the tool."""
# setting up needed pieces
messages = []
contact_lists = []
email_list = []
# setting up logging
LOG_FILENAME = sys.path[0] + "\\logging_AmicaGP." + dt.now().strftime("%Y%m%d%H%M%S%f") + ".txt"
logging.basicConfig(filename=LOG_FILENAME, format='%(asctime)s %(levelname)s %(message)s', level=10)
with open(LOG_FILENAME, 'w'):
pass
arcpy.AddMessage("log file: " + LOG_FILENAME)
logging.debug('This is a LOG file for AMICA GP tool')
arcpy.Delete_management("in_memory")
json_in = parameters[0].valueAsText
if json_in == 'Input Feature':
logging.debug('Setting up discrete input for publishing purposes')
sys.exit(0)
... View more
07-14-2021
06:32 AM
|
0
|
1
|
3157
|
|
POST
|
I have a python script added to a toolbox in ArcGIS Pro 2.8. I need to terminate early if certain conditions are met but I need the script to complete successfully and not error. I am trying to use sys.exit(0) and it says the script run succeeded in messages. However the History pane is showing it as a Red ! as if it failed which is blocking me from publishing as a web tool. Is there a better way to exit early?
... View more
07-14-2021
06:14 AM
|
0
|
6
|
3168
|
|
POST
|
Hi Duong - Did you ever get an answer to this? I am trying to find this information now.
... View more
07-01-2021
12:14 PM
|
0
|
0
|
2403
|
|
POST
|
I am trying to get the showLayers and hideLayers url parameters to work to no avail. I tried using layer ID and name but neither seem to work. I am using WAB version 2.11. Anyone else able to get layer visibility parameter to work? Looks like it is trying to work but is possibly generating the error seen below. https://developers.arcgis.com/web-appbuilder/guide/xt-app-url-parameters-for-dev.htm Item does not exist or is inaccessible.
init.js:115 TypeError: Cannot read property 'getItemData' of null
at Object.<anonymous> (LayerInfoForMapService.js?wab_dv=2.11:75)
at init.js:64
at l (init.js:108)
at k (init.js:108)
at e.resolve (init.js:110)
at Object.<anonymous> (LayerInfo.js?wab_dv=2.11:1196)
at init.js:64
at l (init.js:108)
at k (init.js:108)
at e.v.reject (init.js:110) "TypeError: Cannot read property 'getItemData' of null
at Object.<anonymous> (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfoForMapService.js?wab_dv=2.11:75:35)
at https://js.arcgis.com/3.27/init.js:64:337
at l (https://js.arcgis.com/3.27/init.js:108:277)
at k (https://js.arcgis.com/3.27/init.js:108:203)
at e.resolve (https://js.arcgis.com/3.27/init.js:110:280)
at Object.<anonymous> (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfo.js?wab_dv=2.11:1196:23)
at https://js.arcgis.com/3.27/init.js:64:337
at l (https://js.arcgis.com/3.27/init.js:108:277)
at k (https://js.arcgis.com/3.27/init.js:108:203)
at e.v.reject (https://js.arcgis.com/3.27/init.js:110:488)
----------------------------------------
rejected at a (https://js.arcgis.com/3.27/init.js:109:174)
at l (https://js.arcgis.com/3.27/init.js:108:436)
at k (https://js.arcgis.com/3.27/init.js:108:203)
at e.resolve (https://js.arcgis.com/3.27/init.js:110:280)
at Object.<anonymous> (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfo.js?wab_dv=2.11:1196:23)
at https://js.arcgis.com/3.27/init.js:64:337
at l (https://js.arcgis.com/3.27/init.js:108:277)
at k (https://js.arcgis.com/3.27/init.js:108:203)
at e.v.reject (https://js.arcgis.com/3.27/init.js:110:488)
at Object.<anonymous> (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfo.js?wab_dv=2.11:1446:35)
----------------------------------------
Error
at e.then.b.then (https://js.arcgis.com/3.27/init.js:111:97)
at Object._needToRefresh (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfoForMapService.js?wab_dv=2.11:74:28)
at Object.init (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfoForMapService.js?wab_dv=2.11:60:12)
at Object.<anonymous> (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfos.js?wab_dv=2.11:508:21)
at Object.forEach (https://js.arcgis.com/3.27/init.js:71:486)
at Object._initSpecifiedLayerInfos (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfos.js?wab_dv=2.11:505:13)
at Object._initLayerInfos (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfos.js?wab_dv=2.11:495:12)
at Object.constructor (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfos.js?wab_dv=2.11:52:12)
at new <anonymous> (https://js.arcgis.com/3.27/init.js:201:85)
at Function.clazz.getInstanceSyncForInit (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfos.js?wab_dv=2.11:1179:29)"
... View more
01-28-2021
10:12 AM
|
0
|
0
|
839
|
|
POST
|
I ended up fixing by using a scratch GDB for the Project output. I think overall a better approach anyway. I appreciate your input.
... View more
01-08-2021
10:06 AM
|
0
|
2
|
3135
|
|
POST
|
Thanks to the suggestion on the scratch GDB I was able to get this working. I am still baffled on why outputting as a shape file no longer works as it has in the past. Either way using the scratch GDB is probably a better approach anyway. Here is what I changed in case anyone else runs into this. I changed this line: projected_point = os.path.join(script_path, "projectedPoint.shp") To this: projected_point = os.path.join(arcpy.env.scratchGDB, "projectedPoint") Thanks to all for the help!
... View more
01-08-2021
09:26 AM
|
4
|
0
|
3146
|
|
POST
|
So I checked the output path of sys.path[0] when the tool runs and it is D:\arcgisserver\directories\arcgissystem\arcgisinput\GPTools\ExposureTool.GPServer\extracted\p20\smsalertgppublish_test. This is a valid directory on the server. and I confirmed there is no existing file there that would need to be overwritten. I also use the same sys.path[0] to create log files for this tool which are being generated successfully indicated it is not a write permission issue on the folder.
... View more
01-08-2021
08:21 AM
|
1
|
4
|
3149
|
|
POST
|
script_path is currently being set as sys.path[0] which should be a good path. But I should confirm that. I will try loggint his path out before I run the reprojection to ensure the path is valid. I can also try hardcoding the path to see if that helps. That will be good from a troubleshooting perspective but I do not like hardcoding paths so I will have to find a better way if it does work out.
... View more
01-08-2021
07:54 AM
|
1
|
0
|
5288
|
|
POST
|
I can't share all the code as it has proprietary business logic but I will share as much as possible. Yes the current output of Project is to a shapefile in the same directory as the python tool by using sys.path[0] to set the path. To elaborate a bit more this tool was originally created in ArcMap and published to my current 10.8.1 server. and worked fine. I am converting it to ArcGIS Pro as we plan on not using ArcMap any longer. I might modifications to get it running with python 3 and it does work fine in ArcGIS Pro. Publishing to Server 10.8.1 as a GP service is where I have the issue.
... View more
01-08-2021
07:48 AM
|
1
|
0
|
3156
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-21-2026 06:15 AM | |
| 4 | 03-12-2025 11:01 AM | |
| 3 | 01-08-2025 09:26 AM | |
| 1 | 01-08-2025 07:19 AM | |
| 1 | 12-06-2024 04:52 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|