<?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 Python addin error: SystemError: NULL object passed to Py_BuildValue in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223693#M17293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a python addin combox. Based on the selection of the combobox the user will get a message. When I test it inside Arcmap, I can see an error in the python window. Can anybody tell me what's wrong with my code that is producing this error? Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SystemError: NULL object passed to Py_BuildValue&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
import arcpy
import pythonaddins

class ComboBoxClass1(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for SARS6_addin.combobox (ComboBox)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.items = ["Forestry Stewardship", "Forestry Management Plan", "Reforestation Accomplished - TFS", "Reforestation Accomplished - Non TFS", "Tree Farm Program - Reinspections", "Tree Farm Program - New Inspections", "Certified Forest Steward - Assist", "Timber Theft Damage Appraisal", "Referral - Consulting Forester", "Referral Vendor", "Incidental Rural Forestry", "Prevention and Reduction of Pest Losses", "Forest Health Monitoring - Survey", "Forest Inventory &amp;amp; Analysis (FIA) Assist", "Best Management Practices (BMP) Assist"]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.editable = False
&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.dropdownWidth = 'WWWWWWWWWWWWWWWWWWWWWWWWWWWWW'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.width = 'WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW'
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onSelChange(self, selection):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if selection == "Forestry Stewardship":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pythonaddins.MessageBox("If in edit mode, please digitize the stewardship boundary and run the ""Stewardship"" tool", "Warning", 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onEditChange(self, text):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onFocus(self, focused):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onEnter(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass
&amp;nbsp;&amp;nbsp;&amp;nbsp; def refresh(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Oct 2013 14:39:17 GMT</pubDate>
    <dc:creator>ionarawilson1</dc:creator>
    <dc:date>2013-10-29T14:39:17Z</dc:date>
    <item>
      <title>Python addin error: SystemError: NULL object passed to Py_BuildValue</title>
      <link>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223693#M17293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a python addin combox. Based on the selection of the combobox the user will get a message. When I test it inside Arcmap, I can see an error in the python window. Can anybody tell me what's wrong with my code that is producing this error? Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SystemError: NULL object passed to Py_BuildValue&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
import arcpy
import pythonaddins

class ComboBoxClass1(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for SARS6_addin.combobox (ComboBox)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.items = ["Forestry Stewardship", "Forestry Management Plan", "Reforestation Accomplished - TFS", "Reforestation Accomplished - Non TFS", "Tree Farm Program - Reinspections", "Tree Farm Program - New Inspections", "Certified Forest Steward - Assist", "Timber Theft Damage Appraisal", "Referral - Consulting Forester", "Referral Vendor", "Incidental Rural Forestry", "Prevention and Reduction of Pest Losses", "Forest Health Monitoring - Survey", "Forest Inventory &amp;amp; Analysis (FIA) Assist", "Best Management Practices (BMP) Assist"]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.editable = False
&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.dropdownWidth = 'WWWWWWWWWWWWWWWWWWWWWWWWWWWWW'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.width = 'WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW'
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onSelChange(self, selection):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if selection == "Forestry Stewardship":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pythonaddins.MessageBox("If in edit mode, please digitize the stewardship boundary and run the ""Stewardship"" tool", "Warning", 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onEditChange(self, text):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onFocus(self, focused):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onEnter(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass
&amp;nbsp;&amp;nbsp;&amp;nbsp; def refresh(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 14:39:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223693#M17293</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2013-10-29T14:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Python addin error: SystemError: NULL object passed to Py_BuildValue</title>
      <link>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223694#M17294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When does this occur? In what method? Does it give any more information? Do the items you assign in __init__ show up in the combobox? What version of ArcGIS are you using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 14:52:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223694#M17294</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2013-10-29T14:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python addin error: SystemError: NULL object passed to Py_BuildValue</title>
      <link>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223695#M17295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It shows up after I hit ok in the message box. The items appear, but after I click ok, the item does not stay selected. I can see the item and the other items if I use the dropdown menu, but it would be nice if it stayed selected. It does not provide any other information. I am using 10.1. Thank you Jason!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 14:56:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223695#M17295</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2013-10-29T14:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python addin error: SystemError: NULL object passed to Py_BuildValue</title>
      <link>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223696#M17296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Issue appears to have been fixed either in 10.1 SP1 or 10.2.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 15:06:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223696#M17296</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2013-10-29T15:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Python addin error: SystemError: NULL object passed to Py_BuildValue</title>
      <link>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223697#M17297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I do have sp1&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 15:09:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223697#M17297</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2013-10-29T15:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python addin error: SystemError: NULL object passed to Py_BuildValue</title>
      <link>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223698#M17298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How can I make it stay selected after I hit ok? thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 15:10:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223698#M17298</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2013-10-29T15:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Python addin error: SystemError: NULL object passed to Py_BuildValue</title>
      <link>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223699#M17299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I figured: You just need to make it editable&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 18:57:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-addin-error-systemerror-null-object-passed/m-p/223699#M17299</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2013-10-29T18:57:49Z</dc:date>
    </item>
  </channel>
</rss>

