Decode PUP data Error when reading radar data [How to Solve]

Example of reading pup radar data official website:

Run the sample code

from import PUP
f = PUP(path+pup_file)
data = f.get_data()

Error 1 connection timeout: (‘connection aborted.’, timeouterror (10060, ‘because the connection party is not correct after a period of time


Add code to the program of the path to extend the connection time threshold timeout = 100, as shown in the figure

Error reporting matrix out of range

HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url: /Unidata/MetPy/raw/v1.0.1/staticdata/airport-codes.csv (Caused by ConnectTimeoutError(< urllib3.connection.HTTPSConnection object at 0x000001EA124FA370>, ‘ Connection to timed out. (connect timeout=3)’))


Still in the program just now, add code

            s = requests.session()
            s.keep_alive = False
            # InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
            # HTTPSConnectionPool(host='', port=443): Max retries exceeded with url
            response = requests.get(url, **kwargs,timeout=100,verify=False,)  ####

Error report: three library package import error


Change relative path to absolute path

Run successfully

Read More: