Splunk Enterprise

Upgrade Readiness App

AndyC2
Observer

Hi, this app is reporting one of my private apps is not compatible with Python 3.

Issue:
 File path designates Python 2 library.
App:TA-LoRaWAN_decoders
File Path:.../bin/br_uncompress.py
Issue No.
Issues
1.
Error while checking the script:
Can't parse /opt/splunk/etc/apps/TA-LoRaWAN_decoders/bin/br_uncompress.py: ParseError: bad input: type=1, value='print', context=(' ', (24, 8))
 
Any suggestions as to what the issue is?
Labels (1)
0 Karma

diogofgm
SplunkTrust
SplunkTrust

Since September 2021, Splunk does not include python 2. so you need to update your code if its not compatible with python 3.

https://www.splunk.com/en_us/blog/platform/removing-python-2-from-new-splunk-cloud-and-splunk-enterp... 

------------
Hope I was able to help you. If so, some karma would be appreciated.
0 Karma

AndyC2
Observer

Hi, yep I understand that but I don't understand what the error is telling me:

Error while checking the script:
Can't parse /opt/splunk/etc/apps/TA-LoRaWAN_decoders/bin/br_uncompress.py: ParseError: bad input: type=1, value='print', context=(' ', (25, 8))
 
I think it's referring to line 25 which is:
 
def print(self, message, end="\n"):
 
 
0 Karma

diogofgm
SplunkTrust
SplunkTrust

Is this TA hosted somewhere so we could have a better picture of what the complete python code looks like? 

------------
Hope I was able to help you. If so, some karma would be appreciated.
0 Karma

AndyC2
Observer
0 Karma

y2000maxima
Engager

Hi. Were you able to overcome this issue?  

0 Karma

AndyC2
Observer

Hi, no, I still don't know what the message means!

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...