<?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 coldToFrozenScript - with python 3.6 - Problems in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/coldToFrozenScript-with-python-3-6-Problems/m-p/438377#M7944</link>
    <description>&lt;P&gt;Hi there, &lt;/P&gt;

&lt;P&gt;i expand the coldToFrozenScript.py to a compressing &amp;amp; encryption function (tar and python gpg) . &lt;BR /&gt;
It runs well when i start this manualy with python3 . I cant run this in python 2.7 because i got several errors. &lt;/P&gt;

&lt;P&gt;So when spunk starts the script, i got errors.. Have you any idea which i can solve this issue?  I know, splunk use python 2.7 but iḿ not python experienced very well. &lt;/P&gt;

&lt;P&gt;Thx ! &lt;/P&gt;

&lt;P&gt;BucketMover - coldToFrozenScript cmd='"/usr/bin/python3.6" "/home/phil/Nextcloud/Work/coldToFrozen_testing_python3_manual.py" /opt/splunk/var/lib/splunk/test/colddb/db_1552398887_1552398884_47' exited with non-zero status='exited with code 1'&lt;BR /&gt;
03-12-2019 15:40:37.126 +0100 ERROR BucketMover - coldToFrozenScript cmd='"/usr/bin/python3.6" "/home/phil/Nextcloud/Work/coldToFrozen_testing_python3_manual.py" /opt/splunk/var/lib/splunk/test/colddb/db_1552398895_1552398893_48' exited with non-zero status='exited with code 1'&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript Error in sitecustomize; set PYTHONVERBOSE for traceback:&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript AttributeError: module 'sys' has no attribute 'setdefaultencoding'&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript Traceback (most recent call last):&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript   File "/home/phil/Nextcloud/Work/coldToFrozen_testing_python3_manual.py", line 5, in &lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript     import fs&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript   File "/usr/local/lib/python3.6/dist-packages/fs/&lt;STRONG&gt;init&lt;/STRONG&gt;.py", line 4, in &lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript     &lt;STRONG&gt;import&lt;/STRONG&gt;("pkg_resources").declare_namespace(&lt;STRONG&gt;name&lt;/STRONG&gt;)&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript   File "/opt/splunk/lib/python2.7/site-packages/pkg_resources.py", line 33&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript     def _bypass_ensure_directory(name, mode=0777):&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript                                                ^&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript SyntaxError: invalid token&lt;BR /&gt;
03-12-2019 15:40:37.175 +0100 ERROR BucketMover - coldToFrozenScript Error in sitecustomize; set PYTHONVERBOSE for traceback:&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 23:41:08 GMT</pubDate>
    <dc:creator>hiph151</dc:creator>
    <dc:date>2020-09-29T23:41:08Z</dc:date>
    <item>
      <title>coldToFrozenScript - with python 3.6 - Problems</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/coldToFrozenScript-with-python-3-6-Problems/m-p/438377#M7944</link>
      <description>&lt;P&gt;Hi there, &lt;/P&gt;

&lt;P&gt;i expand the coldToFrozenScript.py to a compressing &amp;amp; encryption function (tar and python gpg) . &lt;BR /&gt;
It runs well when i start this manualy with python3 . I cant run this in python 2.7 because i got several errors. &lt;/P&gt;

&lt;P&gt;So when spunk starts the script, i got errors.. Have you any idea which i can solve this issue?  I know, splunk use python 2.7 but iḿ not python experienced very well. &lt;/P&gt;

&lt;P&gt;Thx ! &lt;/P&gt;

&lt;P&gt;BucketMover - coldToFrozenScript cmd='"/usr/bin/python3.6" "/home/phil/Nextcloud/Work/coldToFrozen_testing_python3_manual.py" /opt/splunk/var/lib/splunk/test/colddb/db_1552398887_1552398884_47' exited with non-zero status='exited with code 1'&lt;BR /&gt;
03-12-2019 15:40:37.126 +0100 ERROR BucketMover - coldToFrozenScript cmd='"/usr/bin/python3.6" "/home/phil/Nextcloud/Work/coldToFrozen_testing_python3_manual.py" /opt/splunk/var/lib/splunk/test/colddb/db_1552398895_1552398893_48' exited with non-zero status='exited with code 1'&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript Error in sitecustomize; set PYTHONVERBOSE for traceback:&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript AttributeError: module 'sys' has no attribute 'setdefaultencoding'&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript Traceback (most recent call last):&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript   File "/home/phil/Nextcloud/Work/coldToFrozen_testing_python3_manual.py", line 5, in &lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript     import fs&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript   File "/usr/local/lib/python3.6/dist-packages/fs/&lt;STRONG&gt;init&lt;/STRONG&gt;.py", line 4, in &lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript     &lt;STRONG&gt;import&lt;/STRONG&gt;("pkg_resources").declare_namespace(&lt;STRONG&gt;name&lt;/STRONG&gt;)&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript   File "/opt/splunk/lib/python2.7/site-packages/pkg_resources.py", line 33&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript     def _bypass_ensure_directory(name, mode=0777):&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript                                                ^&lt;BR /&gt;
03-12-2019 15:40:37.170 +0100 ERROR BucketMover - coldToFrozenScript SyntaxError: invalid token&lt;BR /&gt;
03-12-2019 15:40:37.175 +0100 ERROR BucketMover - coldToFrozenScript Error in sitecustomize; set PYTHONVERBOSE for traceback:&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:41:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/coldToFrozenScript-with-python-3-6-Problems/m-p/438377#M7944</guid>
      <dc:creator>hiph151</dc:creator>
      <dc:date>2020-09-29T23:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: coldToFrozenScript - with python 3.6 - Problems</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/coldToFrozenScript-with-python-3-6-Problems/m-p/438378#M7945</link>
      <description>&lt;P&gt;just my 2 cents.&lt;BR /&gt;
If you have python 3.6 installed on the same instance than splunk, could you reconfigure your splunk python 2.7 coldToFrozenScript script as  a wrapper to pass the argument to a different script that will execute on the 3.6 version, then return the results.&lt;/P&gt;

&lt;P&gt;Long term, it seems that the python 2.7 will be deprecated, so maybe a new version will be shipped with splunk in the future.&lt;BR /&gt;
see this official response: &lt;A href="https://www.splunk.com/blog/2018/10/26/splunk-and-python-2-7-eol.html"&gt;https://www.splunk.com/blog/2018/10/26/splunk-and-python-2-7-eol.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 22:03:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/coldToFrozenScript-with-python-3-6-Problems/m-p/438378#M7945</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2019-03-14T22:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: coldToFrozenScript - with python 3.6 - Problems</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/coldToFrozenScript-with-python-3-6-Problems/m-p/438379#M7946</link>
      <description>&lt;P&gt;Thx for your answer. I could solv this problem, i got the script to run with my extension under python 2.7. &lt;BR /&gt;
But next year Python 2.7 will be deprecated so than also Splunk have to move.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 12:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/coldToFrozenScript-with-python-3-6-Problems/m-p/438379#M7946</guid>
      <dc:creator>hiph151</dc:creator>
      <dc:date>2019-03-18T12:07:24Z</dc:date>
    </item>
  </channel>
</rss>

