Project

General

Profile

Actions

Bug #4679

open

RepeaterBook lookup failing with SSL: CERTIFICATE_VERIFY_FAILED error

Added by Russell Ault about 7 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/28/2017
Due date:
% Done:

0%

Estimated time:
Chirp Version:
daily
Model affected:
(All models)
Platform:
Windows
Debug Log:
I read the instructions above:

Description

Windows 10 Pro, latest DAILY 20170324

Querying or Importing from RepeaterBook fails with the following relevant log entry:

C:\Program Files (x86)\CHIRP\chirpw.exe\chirp\ui\inputdialog.py:106: GtkWarning: gtk_dialog_set_default_response: assertion `GTK_IS_DIALOG (dialog)' failed
http://www.repeaterbook.com/repeaters/downloads/chirp.php?func=default&state_id=CA01&band=%%&freq=%&band6=%&loc=%&county_id=%&status_id=%&features=%&coverage=%&use=%
Traceback (most recent call last):
File "chirp\ui\mainapp.pyo", line 1598, in mh
File "chirp\ui\mainapp.pyo", line 982, in do_repeaterbook_political
File "urllib.pyo", line 98, in urlretrieve
File "urllib.pyo", line 245, in retrieve
File "urllib.pyo", line 213, in open
File "urllib.pyo", line 364, in open_http
File "urllib.pyo", line 377, in http_error
File "urllib.pyo", line 641, in http_error_302
File "urllib.pyo", line 667, in redirect_internal
File "urllib.pyo", line 213, in open
File "urllib.pyo", line 443, in open_https
File "httplib.pyo", line 1049, in endheaders
File "httplib.pyo", line 893, in send_output
File "httplib.pyo", line 855, in send
File "httplib.pyo", line 1274, in connect
File "ssl.pyo", line 352, in wrap_socket
File "ssl.pyo", line 579, in __init
_
File "ssl.pyo", line 808, in do_handshake
IOError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
[2017-03-28 12:05:11,039] chirp.platform - ERROR: Failed to get filename: (0, 'GetOpenFileNameW', 'No error message is available')

The SSL error is thrown despite the non-HTTPS request because RepeaterBook is forwarding requests to HTTPS. For what it's worth, the link in the error log works in my browser without any certificate warnings and I am able to import the data manually from the downloaded CSV file.

Thanks!


Files

debug.log (22.2 KB) debug.log Scott Eikenberry, 08/10/2018 12:42 PM

Related issues

Related to Bug #3019: SSL: CERTIFICATE_VERIFY_FAILED, Windows 8, repeater book queryClosed11/23/2015

Actions
Related to Bug #4555: CHIRP doesnt connect to RepeaterbookClosed02/22/2017

Actions
Actions #1

Updated by Tom Hayward about 7 years ago

  • Chirp Version changed from 0.4.0 to daily

FWIW, I was unable to reproduce this on Ubuntu or OS X.

On Windows, I think Python uses an internal CA bundle rather than the system's. RepeaterBook uses GoDaddy G2 CA. Apparently this isn't in the bundle.

Actions #2

Updated by Russell Ault about 7 years ago

That's what I was going to guess. Of course, the CHIRP Windows installer bundles Python 2.7, so (if I'm understanding this correctly) it's the CHIRP-bundled Python CA bundle that needs to be updated.

Thanks!

Actions #3

Updated by Scott Eikenberry over 5 years ago

I am having this same problem on a brand new Windows 10 laptop with the latest daily build 20180810. I tried disabling the Python SSL Certificate check by setting the environment variable PYTHONHTTPSVERIFY to 0 but that didn't work. All the other Python work around seem to involve code or importing certs or adding pip directories to your path. I did a bunch of research but couldn't get any of those workarounds to work.

Maybe you could just disable the SSL Certificate check for repeaterbook? The URL does not even appear to be HTTPS.

I think this code snippet will disable the check:

import ssl

try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
# Legacy Python that doesn't verify HTTPS certificates by default
pass
else:
# Handle target environment that doesn't support HTTPS verification
ssl._create_default_https_context = _create_unverified_https_context

Here is error from the debug.log
C:\CHIRP\chirpw.exe\chirp\ui\inputdialog.py:106: GtkWarning: gtk_dialog_set_default_response: assertion `GTK_IS_DIALOG (dialog)' failed
http://www.repeaterbook.com/repeaters/downloads/chirp.php?func=default&state_id=41&band=%%&freq=%&band6=%&loc=%&county_id=051&status_id=%&features=%&coverage=%&use=%
Traceback (most recent call last):
File "chirp\ui\mainapp.pyo", line 1639, in mh
File "chirp\ui\mainapp.pyo", line 1015, in do_repeaterbook_political
File "urllib.pyo", line 98, in urlretrieve
File "urllib.pyo", line 245, in retrieve
File "urllib.pyo", line 213, in open
File "urllib.pyo", line 364, in open_http
File "urllib.pyo", line 377, in http_error
File "urllib.pyo", line 641, in http_error_302
File "urllib.pyo", line 667, in redirect_internal
File "urllib.pyo", line 213, in open
File "urllib.pyo", line 443, in open_https
File "httplib.pyo", line 1049, in endheaders
File "httplib.pyo", line 893, in send_output
File "httplib.pyo", line 855, in send
File "httplib.pyo", line 1274, in connect
File "ssl.pyo", line 352, in wrap_socket
File "ssl.pyo", line 579, in __init
_
File "ssl.pyo", line 808, in do_handshake
IOError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

Actions #4

Updated by Scott Eikenberry over 5 years ago

I installed Python and confirmed I could download the RepeaterBook with a simple command line call and did not get an SSL certificate error. Not sure what is different when I am running the application.

PS C:> python
Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import wget
wget.download("http://www.repeaterbook.com/repeaters/downloads/chirp.php?func=default&state_id=41&band=%%&freq=%&band6=%&loc=%&county_id=051&status_id=%&features=%&coverage=%&use=%")
-1 / unknown'RepeaterBook_CHIRP_1808101620.csv'
wget.download("http://www.repeaterbook.com/repeaters/downloads/chirp.php?func=default&state_id=41&band=%%&freq=%&band6=%&loc=%&county_id=051")
-1 / unknown'RepeaterBook_CHIRP_1808101622.csv'

Sample output from the downloaded file.
PS C:\Users\scott> more .\RepeaterBook_CHIRP_1808101620.csv
Location,Name,Frequency,Duplex,Offset,Tone,rToneFreq,cToneFreq,DtcsCode,DtcsPolarity,Mode,TStep,Comment
1,N7NLL,53.09000,-,1.7,Tone,107.2,88.5,023,NN,FM,5,"Portland, Healy Heights",
2,K7LJ,145.23000,-,0.60000,,88.5,88.5,023,NN,FM,5,"Portland, Council Crest",
3,KE7FBE,145.25000,-,0.60000,Tone,136.5,88.5,023,NN,FM,5,"Portland, VA Hospital",
4,N7EXH,145.31000,-,0.60000,Tone,123.0,123.0,023,NN,FM,5,"Portland, Skyline",
5,K7LJ,145.39000,-,0.60000,Tone,100.0,88.5,023,NN,FM,5,"Portland, Mt Tabor",
6,KE7AWR,146.70000,-,0.60000,Tone,100.0,100.0,023,NN,FM,5,"Portland, Stonehenge Tower",
7,N7EXH,146.98000,-,0.60000,DTCS,88.5,88.5,023,NN,FM,5,"Portland, KGW Tower",

I also did a wget.download from inside python for both https://www.google.com and https://www.godaddy.com and they both worked as well without an SSL error.

Actions

Also available in: Atom PDF