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!

Troubleshooting the OpenTelemetry Collector

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

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...