All Apps and Add-ons
Highlighted

Geeting error in Splunk Appinspect :- Check that python version is python3 for executables in restmap.conf.

Explorer

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.

Thanks.

Labels (1)
0 Karma
Highlighted

Re: Geeting error in Splunk Appinspect :- Check that python version is python3 for executables in restmap.conf.

Path Finder

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:

https://splunkbase.splunk.com/app/4976/

Looking at this page, the entry near the top suggests appInspect was updated 28th April

https://dev.splunk.com/enterprise/docs/releaseapps/appinspect/appinspectreferencetopics/splunkappins...

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.

0 Karma
Highlighted

Re: Geeting error in Splunk Appinspect :- Check that python version is python3 for executables in restmap.conf.

Path Finder

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
0 Karma
Highlighted

Re: Geeting error in Splunk Appinspect :- Check that python version is python3 for executables in restmap.conf.

Can you please share the error message as well.

0 Karma
Highlighted

Re: Geeting error in Splunk Appinspect :- Check that python version is python3 for executables in restmap.conf.

Path Finder

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.

0 Karma
Highlighted

Re: Geeting error in Splunk Appinspect :- Check that python version is python3 for executables in restmap.conf.

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.

Example:

[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.

View solution in original post

Highlighted

Re: Geeting error in Splunk Appinspect :- Check that python version is python3 for executables in restmap.conf.

Explorer

I had also implemented the same and it started working.
Thanks.

0 Karma
Speak Up for Splunk Careers!

We want to better understand the impact Splunk experience and expertise has has on individuals' careers, and help highlight the growing demand for Splunk skills.