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
Get Updates on the Splunk Community!

Index This | When is October more than just the tenth month?

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

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...