<?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 script error during installation of Splunk Forwarder Add-on for WAS in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Python-script-error-during-installation-of-Splunk-Forwarder-Add/m-p/56841#M11074</link>
    <description>&lt;P&gt;I see below error while running installation script of Splunk Forwarder Add-on for WAS.&lt;BR /&gt;
$ python was_log_inputs.py&lt;BR /&gt;
  File "was_log_inputs.py", line 228&lt;BR /&gt;
    with open('../local/'+componentconf, 'wb') as configfile:&lt;BR /&gt;
            ^&lt;BR /&gt;
SyntaxError: invalid syntax&lt;/P&gt;

&lt;P&gt;Universal forwarder binary name: splunkforwarder-4.3.2-123586-Linux-x86_64&lt;BR /&gt;
WAS Add on binary name: splunk_forwarder_addon_was-2.0.0-123159.tar&lt;/P&gt;

&lt;P&gt;Please advise.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 11:50:53 GMT</pubDate>
    <dc:creator>lalbsah</dc:creator>
    <dc:date>2020-09-28T11:50:53Z</dc:date>
    <item>
      <title>Python script error during installation of Splunk Forwarder Add-on for WAS</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Python-script-error-during-installation-of-Splunk-Forwarder-Add/m-p/56841#M11074</link>
      <description>&lt;P&gt;I see below error while running installation script of Splunk Forwarder Add-on for WAS.&lt;BR /&gt;
$ python was_log_inputs.py&lt;BR /&gt;
  File "was_log_inputs.py", line 228&lt;BR /&gt;
    with open('../local/'+componentconf, 'wb') as configfile:&lt;BR /&gt;
            ^&lt;BR /&gt;
SyntaxError: invalid syntax&lt;/P&gt;

&lt;P&gt;Universal forwarder binary name: splunkforwarder-4.3.2-123586-Linux-x86_64&lt;BR /&gt;
WAS Add on binary name: splunk_forwarder_addon_was-2.0.0-123159.tar&lt;/P&gt;

&lt;P&gt;Please advise.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:50:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Python-script-error-during-installation-of-Splunk-Forwarder-Add/m-p/56841#M11074</guid>
      <dc:creator>lalbsah</dc:creator>
      <dc:date>2020-09-28T11:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Python script error during installation of Splunk Forwarder Add-on for WAS</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Python-script-error-during-installation-of-Splunk-Forwarder-Add/m-p/56842#M11075</link>
      <description>&lt;P&gt;I have the same issue - albeit on AIX.  &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;python -V&lt;BR /&gt;
Python 2.3.4&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Has anyone solved this yet?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2012 13:17:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Python-script-error-during-installation-of-Splunk-Forwarder-Add/m-p/56842#M11075</guid>
      <dc:creator>glitchcowboy</dc:creator>
      <dc:date>2012-06-21T13:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Python script error during installation of Splunk Forwarder Add-on for WAS</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Python-script-error-during-installation-of-Splunk-Forwarder-Add/m-p/56843#M11076</link>
      <description>&lt;P&gt;It appears that the Python "with" statement didn't exist until sometime after Python 2.5.  Not an authoritative source, but good enough for a perl/shell programmer: &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://preshing.com/20110920/the-python-with-statement-by-example"&gt;http://preshing.com/20110920/the-python-with-statement-by-example&lt;/A&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 21 Jun 2012 13:27:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Python-script-error-during-installation-of-Splunk-Forwarder-Add/m-p/56843#M11076</guid>
      <dc:creator>glitchcowboy</dc:creator>
      <dc:date>2012-06-21T13:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Python script error during installation of Splunk Forwarder Add-on for WAS</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Python-script-error-during-installation-of-Splunk-Forwarder-Add/m-p/56844#M11077</link>
      <description>&lt;P&gt;The with statement in Python simplifies exception handling by encapsulating common preparation and clean-up tasks in so-called context managers. This allows common try..except..finally usage patterns to be encapsulated for convenient reuse and reduce the amount of code you need to write for handling different kinds of exceptions. The &lt;A href="http://net-informations.com/python/flow/with.htm"&gt;with statement&lt;/A&gt; creates resources within a block . You write your code using the resources within the block. When the block exits the resources are cleanly released regardless of the outcome of the code in the block (that is whether the block exits normally or because of an exception).&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 04:42:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Python-script-error-during-installation-of-Splunk-Forwarder-Add/m-p/56844#M11077</guid>
      <dc:creator>quincybatten</dc:creator>
      <dc:date>2019-07-19T04:42:10Z</dc:date>
    </item>
  </channel>
</rss>

