<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python Addin Error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-addin-error/m-p/560040#M43806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a similar problem where my GP Tool Name in the properties didnt match my call. GP Tool has a name and label in the properties and I was calling the label because that what showed in Catalog within the toolbar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Dec 2014 18:04:52 GMT</pubDate>
    <dc:creator>JoshuaPust</dc:creator>
    <dc:date>2014-12-31T18:04:52Z</dc:date>
    <item>
      <title>Python Addin Error</title>
      <link>https://community.esri.com/t5/python-questions/python-addin-error/m-p/560039#M43805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a Toolbar with five buttons created and loaded through Python Addin (ArcMap 10.1).&amp;nbsp; The last tool has the image, shows the caption, but an error pops up when the tool is clicked.&amp;nbsp; The Error reads, "Failed to open tool TRSearch.py(BCPAO.tbx).&amp;nbsp; The name of the tool is TRSearch.py and is located within the BCPAO toolbox.&amp;nbsp; The python script is saved within the same folder as the other scripts and the name is correct.&amp;nbsp; All of the other buttons work.&amp;nbsp; Any ideas why the TRSearch.py button does not work?&amp;nbsp; I have included my Addin script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
import pythonaddins

class ButtonClass(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for BCPAO_addin.button (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pythonaddins.GPToolDialog(r'E:\User\Python\ArcGIS10.1_Scripts\BCPAO.tbx', 'ParcelSearch.py')

class ButtonClass1(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for BCPAO_addin.button_1 (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pythonaddins.GPToolDialog(r'E:\User\Python\ArcGIS10.1_Scripts\BCPAO.tbx', 'SectionSearch.py')

class ButtonClass2(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for BCPAO_addin.button_2 (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pythonaddins.GPToolDialog(r'E:\User\Python\ArcGIS10.1_Scripts\BCPAO.tbx', 'CalculateArea.py')

class ButtonClass3(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for BCPAO_addin.button_3 (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pythonaddins.GPToolDialog(r'E:\User\Python\ArcGIS10.1_Scripts\BCPAO.tbx', 'NameDate.py')

class ButtonClass4(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for BCPAO_addin.button_4 (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pythonaddins.GPToolDialog(r'E:\User\Python\ArcGIS10.1_Scripts\BCPAO.tbx', 'TRSearch.py')&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 17:40:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-addin-error/m-p/560039#M43805</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2013-08-01T17:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Python Addin Error</title>
      <link>https://community.esri.com/t5/python-questions/python-addin-error/m-p/560040#M43806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a similar problem where my GP Tool Name in the properties didnt match my call. GP Tool has a name and label in the properties and I was calling the label because that what showed in Catalog within the toolbar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Dec 2014 18:04:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-addin-error/m-p/560040#M43806</guid>
      <dc:creator>JoshuaPust</dc:creator>
      <dc:date>2014-12-31T18:04:52Z</dc:date>
    </item>
  </channel>
</rss>

