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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...