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

Example of reading pup radar data official website:

Run the sample code

from cinrad.io import PUP
pup_file='Z_RADR_I_Z9591_20210901004700_P_DOR_SA_V_10_230_60.591.bin'
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

Solution:

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=‘github.com’, 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 github.com timed out. (connect timeout=3)’))

resolvent:

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='api.github.com', port=443): Max retries exceeded with url
            requests.packages.urllib3.disable_warnings()
            
            response = requests.get(url, **kwargs,timeout=100,verify=False,)  ####

Error report: three library package import error

Solution:

Change relative path to absolute path


Run successfully

Read More: