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

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...