<?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: Custom Script and python 3.7 gives strange Loglevel Error in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/543255#M9114</link>
    <description>&lt;P&gt;Per &lt;A href="https://docs.splunk.com/Documentation/SA-LdapSearch/3.0.2/User/UseSA-ldapsearchtotroubleshootproblems" target="_blank"&gt;https://docs.splunk.com/Documentation/SA-LdapSearch/3.0.2/User/UseSA-ldapsearchtotroubleshootproblems&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Your app's logging.conf file has a line like this in it:&lt;BR /&gt;level&amp;nbsp;&lt;SPAN&gt;ERROR ; Default: WARNING&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And it needs to look like this:&lt;BR /&gt;level ERROR&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Mar 2021 20:31:47 GMT</pubDate>
    <dc:creator>peterezzo</dc:creator>
    <dc:date>2021-03-10T20:31:47Z</dc:date>
    <item>
      <title>Custom Script and python 3.7 gives strange Loglevel Error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/509667#M9111</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I've enabled the python 3.7 Support on my installation, but now my external command won't work anymore, saying i have some syntax error, which i'm not able to find in the binary tree of my command app...&lt;/P&gt;&lt;P&gt;And the command works with python 2.7...&lt;/P&gt;&lt;P&gt;The message is:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;ValueError: Unknown level: 'ERROR ; Default: WARNING'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The full log is:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;07-17-2020 10:12:48.713 ERROR ScriptRunner - stderr from '&lt;STRONG&gt;/opt/splunk/bin/python3.7&lt;/STRONG&gt; /opt/splunk/etc/apps/elasticsplunk/bin/elasticsplunk.py __GETINFO__ eaddr=cluster1 index=testdrive query="state:IL or state=TN and age&amp;gt;22"':&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;Traceback (most recent call last):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;File "/opt/splunk/etc/apps/elasticsplunk/bin/elasticsplunk.py", line 49, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;from splunklib.searchcommands import dispatch, StreamingCommand, GeneratingCommand, Configuration, Option, validators&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;File "/opt/splunk/etc/apps/elasticsplunk/bin/splunklib/searchcommands/__init__.py", line 145, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;from .environment import *&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;File "/opt/splunk/etc/apps/elasticsplunk/bin/splunklib/searchcommands/environment.py", line 120, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;splunklib_logger, logging_configuration = configure_logging('splunklib')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;File "/opt/splunk/etc/apps/elasticsplunk/bin/splunklib/searchcommands/environment.py", line 103, in configure_logging&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;fileConfig(filename, {'SPLUNK_HOME': splunk_home})&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;File "/opt/splunk/lib/python3.7/logging/config.py", line 80, in fileConfig&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;_install_loggers(cp, handlers, disable_existing_loggers)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;File "/opt/splunk/lib/python3.7/logging/config.py", line 195, in _install_loggers&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;log.setLevel(level)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;File "/opt/splunk/lib/python3.7/logging/__init__.py", line 1353, in setLevel&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;self.level = _checkLevel(level)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;File "/opt/splunk/lib/python3.7/logging/__init__.py", line 192, in _checkLevel&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;raise ValueError("Unknown level: %r" % level)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ValueError: Unknown level: 'ERROR ; Default: WARNING'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;07-17-2020 10:12:48.725 ERROR script - Getinfo probe failed for external search command 'ess'.&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 09:10:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/509667#M9111</guid>
      <dc:creator>Elsurion</dc:creator>
      <dc:date>2020-07-17T09:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Script and python 3.7 gives strange Loglevel Error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/509692#M9112</link>
      <description>Did you run the Splunk Platform Upgrade Readiness App (&lt;A href="https://splunkbase.splunk.com/app/4698/" target="_blank"&gt;https://splunkbase.splunk.com/app/4698/&lt;/A&gt;) ? It should have identified this before you upgraded. It might have identified the change that needed to be made to support Python 3.</description>
      <pubDate>Fri, 17 Jul 2020 13:08:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/509692#M9112</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-17T13:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Script and python 3.7 gives strange Loglevel Error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/509700#M9113</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I've executed the readyness tool but it had only warnings and not a single blocker.&lt;BR /&gt;Including the splunklib which should be ready for 3....&lt;BR /&gt;&lt;BR /&gt;That's why i have no clue why the logger breaks. Every other point where the syntax changed yes, but not in the logger.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 13:25:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/509700#M9113</guid>
      <dc:creator>Elsurion</dc:creator>
      <dc:date>2020-07-17T13:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Script and python 3.7 gives strange Loglevel Error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/543255#M9114</link>
      <description>&lt;P&gt;Per &lt;A href="https://docs.splunk.com/Documentation/SA-LdapSearch/3.0.2/User/UseSA-ldapsearchtotroubleshootproblems" target="_blank"&gt;https://docs.splunk.com/Documentation/SA-LdapSearch/3.0.2/User/UseSA-ldapsearchtotroubleshootproblems&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Your app's logging.conf file has a line like this in it:&lt;BR /&gt;level&amp;nbsp;&lt;SPAN&gt;ERROR ; Default: WARNING&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And it needs to look like this:&lt;BR /&gt;level ERROR&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 20:31:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/543255#M9114</guid>
      <dc:creator>peterezzo</dc:creator>
      <dc:date>2021-03-10T20:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Script and python 3.7 gives strange Loglevel Error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/560102#M9115</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/90162"&gt;@Elsurion&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Came to this thread randomly for the same needs (elasticsearch Python)&lt;BR /&gt;I just got rid of the logging.conf and that fixes import issues in 8.2.x&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 18:04:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Custom-Script-and-python-3-7-gives-strange-Loglevel-Error/m-p/560102#M9115</guid>
      <dc:creator>guilmxm</dc:creator>
      <dc:date>2021-07-19T18:04:36Z</dc:date>
    </item>
  </channel>
</rss>

