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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...