It seems one of the URLs for the built-in SOFA files has gone bad and reveals a bug in the code.
from pyroomacoustics.directivities import MeasuredDirectivityFile
if __name__=='__main__':
hrtf = MeasuredDirectivityFile(
path="mit_kemar_normal_pinna.sofa", # SOFA file is in the database
fs=24000,
interp_order=12,
interp_n_points=1000
)
print(hrtf)
When I run the above code, I'm getting the following error:
File "/home/build/.local/share/virtualenvs/pra_dir_test-S0HkAUoS/lib/python3.11/site-packages/pyroomacoustics/datasets/utils.py", line 132, in download_multiple
except URLError:
^^^^^^^^
NameError: name 'URLError' is not defined. Did you mean: 'EOFError'?
This can be fixed by adding from urllib.error import URLError to the beginning of the file.
My guess is that this hasn't been visible before, and now one of the links (https://fedora.kug.ac.at/fedora/objects/o:68229/methods/bdef:Container/get?param0=LSPs_HATS_GuitarCabinets_Akustikmessplatz.sofa) has gone stale and shows the bug.
Python version used: 3.11.8
pyroomacoustics version: 0.8.4
Venv dependencies: pyroomacoustics, numpy, python-sofa
It seems one of the URLs for the built-in SOFA files has gone bad and reveals a bug in the code.
When I run the above code, I'm getting the following error:
This can be fixed by adding
from urllib.error import URLErrorto the beginning of the file.My guess is that this hasn't been visible before, and now one of the links (https://fedora.kug.ac.at/fedora/objects/o:68229/methods/bdef:Container/get?param0=LSPs_HATS_GuitarCabinets_Akustikmessplatz.sofa) has gone stale and shows the bug.
Python version used: 3.11.8
pyroomacoustics version: 0.8.4
Venv dependencies: pyroomacoustics, numpy, python-sofa