While running AppInspect(version 2.1.0) against splunk addon getting an error "checkresthandlerpythonexecutable_exists - Check that python version is python3 for executables in restmap.conf." even I updated it to python3 but still the same error is there however if I am running with old appinspect(version 1.7) it passes splunk app-inspect.
Kindly let me know what I am missing here.
I am also getting this issue running splunk 8.04 and add-on builder v3.0.1. I'm developing an add-on that makes some very simple REST API calls (add-on works fine).
I also changed the global python.version to be python3 in server.conf as well as adding python.version=python3 entries in each of the scripts defined in restmap.conf. I still get the error when running "validate" in the add-on builder (which runs appinspect).
I tested another REST based add-on that previously passed appinspect. It now fails with the same error. This add-on is already on splunkbase and is showing the "AppInspect passed" badge:
Looking at this page, the entry near the top suggests appInspect was updated 28th April
I'm going to email a link to this ticket to the app inspect email address to raise awareness. You should add the "appinspect" tag to this ticket if you can.
restmap.conf - note that I have modified this to add the python.version lines, the add-on builder does not include this by default. Both setups return the error as per original post
(Update - this now works OK for me)
[admin:TA_add_on_for_carbon_intensity] match = / members = TA_add_on_for_carbon_intensity_settings, TA_add_on_for_carbon_intensity_generation, TA_add_on_for_carbon_intensity_regional, TA_add_on_for_carbon_intensity_intensity [admin_external:TA_add_on_for_carbon_intensity_settings] handlertype = python python.version=python3 handlerfile = TA_add_on_for_carbon_intensity_rh_settings.py handleractions = edit, list [admin_external:TA_add_on_for_carbon_intensity_generation] handlertype = python python.version=python3 handlerfile = TA_add_on_for_carbon_intensity_rh_generation.py handleractions = edit, list, remove, create [admin_external:TA_add_on_for_carbon_intensity_regional] handlertype = python python.version=python3 handlerfile = TA_add_on_for_carbon_intensity_rh_regional.py handleractions = edit, list, remove, create [admin_external:TA_add_on_for_carbon_intensity_intensity] handlertype = python python.version=python3 handlerfile = TA_add_on_for_carbon_intensity_rh_intensity.py handleractions = edit, list, remove, create
Can you please share the error message as well.
Just managed to get the add-on through the app inspect phase. I had trouble connecting to the app inspect REST API for a couple of days and I think this error was confusing things. Thanks for your help - I'm will uptick your answer below as the restmap.conf above is now working OK for me.
This check was newly added as part of appinspect 2.1.0 in order to encourage Python3 adoption over Python2.7
Please include the
python.version = python3 in the restmap.conf stanzas.
[admin_external:my_settings] handlertype = python handlerfile = file.py handleractions = edit, list python.version = python3
If you still encounter issues, please post your restmap.conf file.
I had also implemented the same and it started working.