All Apps and Add-ons

Urllib error with Splunk 9.1.2

dave_null
Path Finder

Hello, this app was working fine for me until I updated to Splunk Enterprise 9.1.2, whereupon the urllib library keeps making errors where it does not understand HTTPS. From some rudimentary googling, it appears this may be related to the Splunk python urllib library not being compiled to use SSL. Would it be possible to refactor this app to use the http request helper functions?

 

 

 

 

 

 

bash-4.2$ /opt/splunk/bin/python3 getSplunkAppsV1.py
Traceback (most recent call last):
  File "getSplunkAppsV1.py", line 92, in <module>
    main()
  File "getSplunkAppsV1.py", line 87, in main
    for app_json in iterate_apps(app_func):
  File "getSplunkAppsV1.py", line 76, in iterate_apps
    data = get_apps(limit, offset, app_filter)
  File "getSplunkAppsV1.py", line 35, in get_apps
    data = json.load(urllib.request.urlopen(url))
  File "/opt/splunk/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/splunk/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/opt/splunk/lib/python3.7/urllib/request.py", line 548, in _open
    'unknown_open', req)
  File "/opt/splunk/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/opt/splunk/lib/python3.7/urllib/request.py", line 1420, in unknown_open
    raise URLError('unknown url type: %s' % type)
urllib.error.URLError: <urlopen error unknown url type: https>

 

 

 

 

(The same error is produced when I use python version 2)

Labels (1)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...