I try to click a button that I created in python add-in to execute a model (this model is made of the script tool), the button1 is ok, but when I click the button2 or button3 on the toolbar, it has an error as the title. Below are the pictures of my code and error.
Fig.2 error (look at the black part of error dialog, this error dialog repeats almost 50 times!)
Looking for your reply, thank you so much.
not sure I follow... your pythonaddins.gptooldialog does provide two parameters to it... how many are there supposed to be? the path to the toolbox filename? or the 'service area' or 'find_route' option?
When I click button2 (the second button on the toolbar on figure 2), I want to execute "make service area" and button3 is about "find route". So could you please tell me how to revise the code to fulfile the function that I want. Thank you so much!
cool... a bug http://support.esri.com/en/bugs/nimbus/TklNMDg5MjUz
to an old link which no longer exists "http://forums.arcgis.com/threads/84618-Tip-Python-Addin-getting-custom-tools-toolbox-to-work-GPToolD..."
for old software???
Does it still persist in 10.5.1 since I don't use addins
feng, the error message really makes me think your use of underscores in your tool name is the problem. Have you tried renaming your tool so the name does not include an underscore? For example "ServiceArea" not "Service_Area". You can give the tool pretty label ("Feng's Service Area", but the tool name can't have any special characters.
I tried the link and renamed the tool, but it still has the same problem. Below are the pictures of my revised code and steps. Could you please help me to check the problem? Thank you so much.
Fig.2 the contents of the Install folder
Fig.3 the contents of the script folder