You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following stacktrace from librosa's usage of lazy_loader:
File "C:\...\lib\site-packages\datasets\features\audio.py", line 194, in decode_example
array = librosa.to_mono(array)
File "C:\...\lib\site-packages\lazy_loader\__init__.py", line 78, in __getattr__
attr = getattr(submod, name)
File "C:\...\lib\site-packages\lazy_loader\__init__.py", line 77, in __getattr__
submod = importlib.import_module(submod_path)
File "C:\...\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\.\lib\site-packages\librosa\core\audio.py", line 31, in <module>
samplerate = lazy.load("samplerate")
File "C:\...\lib\site-packages\lazy_loader\__init__.py", line 203, in load
del parent
UnboundLocalError: local variable 'parent' referenced before assignment
The assignment to parent should occur before the try block. Errors with the inspect.stack()[1] chunk should be handled in a separate try/except clause.
The text was updated successfully, but these errors were encountered:
Problem
I get the following stacktrace from
librosa
's usage oflazy_loader
:Here's the offending code block:
Environment
Python version: 3.10
lazy_loader
version: 0.3Solution
The assignment to
parent
should occur before thetry
block. Errors with theinspect.stack()[1]
chunk should be handled in a separatetry/except
clause.The text was updated successfully, but these errors were encountered: