1

I am using Python Add-In Wizard with ArcGIS 10.4.1 but after getting the files I am not able to create installation Wizard!

enter image description here

I tried to create the wizard by double clicking on the enter image description here looks like something running but No installation file generated at the directory! can you please let me know why this is happening?

Update

import arcpy
import pythonaddins

class ButtonClass3(object):
    """Implementation for ESRI Addin Python_addin.button (Button)"""
    def __init__(self):
        self.enabled = True
        self.checked = False
    def onClick(self):
        pass

class ComboBoxClass1(object):
    """Implementation for ESRI Addin Python_addin.combobox (ComboBox)"""
    def __init__(self):
        self.items = ["item1", "item2"]
        self.editable = True
        self.enabled = True
        self.dropdownWidth = 'WWWWWW'
        self.width = 'WWWWWW'
    def onSelChange(self, selection):
        pass
    def onEditChange(self, text):
        pass
    def onFocus(self, focused):
        pass
    def onEnter(self):
        pass
    def refresh(self):
        pass

class ComboBoxClass2(object):
    """Implementation for ESRI Addin Python_addin.combobox_1 (ComboBox)"""
    def __init__(self):
        self.items = ["item1", "item2"]
        self.editable = True
        self.enabled = True
        self.dropdownWidth = 'WWWWWW'
        self.width = 'WWWWWW'
    def onSelChange(self, selection):
        pass
    def onEditChange(self, text):
        pass
    def onFocus(self, focused):
        pass
    def onEnter(self):
        pass
    def refresh(self):
        pass
6
  • hmm. what does the python script inside your Install folder look like?
    – Carl
    May 19, 2017 at 21:48
  • Please take a look at update Carolyn
    – Suffii
    May 19, 2017 at 21:52
  • 1
    Well, that looks right to me, though I'm usually just using a def onClick(self) in mine... There might be some issue with the python version you're using - have you checked this answer yet? gis.stackexchange.com/questions/155012/…
    – Carl
    May 19, 2017 at 22:01
  • well, here is what I got 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] by running the print (sys.version)
    – Suffii
    May 19, 2017 at 22:51
  • 1
    Run it from the command prompt (or your IDE or whatever) instead of double-clicking it. That way the window will stay open and you can see any errors
    – mikewatt
    Aug 27, 2018 at 16:26

1 Answer 1

0

I've had a problem with the makeaddin.py file recently and it turned out to be a bug in the file. Make sure the print command near the bottom of the file has parenthesis around "archive file", so Print (archive_file). Doing this fixed my problem.

enter image description here

1
  • print is a statement in Python 2x, you don't need parentheses. Parentheses are only required in Python 3 (as print() is a function) but Python 3 is only supported in ArcGIS Pro which does not support Python Add Ins.
    – user2856
    Apr 1, 2019 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.