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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...