Hello everybody!
I am developing a simple python application that leverages the Freesound API to download audio files based on a simple "search" request.
The script does the following:
Upon receiving the sound list Response, I loop through the list to get the infos of each file.
The function delegated to request the info is the following:
def get_track_info(track_id:str,params:dict[str,str], token:str) -> Response:
headers: dict[str, str] = {"Authorization": f"Bearer {token}"}
url:str = f"
https://freesound.org/apiv2/sounds/{track_id}/"
file_type_response: Response = make_get_request(url, header=headers, params=params)
return file_type_response
track_id is the id of the track
token is the user access token
params is the list of sound file's parameters that I want to retrieve from the database.
a possible request is hence:
The script has been working until 2 days ago, when the loop could not finish because of the following error:
HTTPSConnectionPool(host='
freesound.org', port=443): Max retries exceeded with url: /apiv2/sounds/630246/?fields=type%2Cchannels%2Cbitdepth%2Csamplerate%2Cdownload (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')))
I have been trying with different queries, but I don't understand whether the problem comes from a new implementation of the urllib3 library, from the server or from my program. Accessing this link from Firefox does not return any error.
Am I simply making too many requests?
I look forward to hearing your opinion
Have a nice day
ddgg