[Bug] huggingface_hub.cached_download() takes 1 positional argument but 2 were given
See original GitHub issueHi!
Followed this model
speechbrain/asr-crdnn-transformerlm-librispeech
from huggingface models hub.
Error
code:
EncoderDecoderASR.from_hparams(
source=asr_model_source,
savedir=to_absolute_path('./models'),
run_opts={'device': torch.device('cpu')}
)
trace (catched in pytest):
score.py:101: in main
asr_model = EncoderDecoderASR.from_hparams(
../miniconda3/lib/python3.9/site-packages/speechbrain/pretrained/interfaces.py:335: in from_hparams
pymodule_local_path = fetch(
> fetched_file = huggingface_hub.cached_download(url, use_auth_token)
E TypeError: cached_download() takes 1 positional argument but 2 were given
../miniconda3/lib/python3.9/site-packages/speechbrain/pretrained/fetching.py:116: TypeError
Versions
pip freeze | grep -E hugging|speech
:
huggingface-hub==0.8.1
speechbrain==0.5.11
version of huggingface-hub<0.8
works fine
Solution
use_auth_token should be a keyword argument
Here is my contribution #1458
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8
Top Results From Across the Web
TypeError: method() takes 1 positional argument but 2 were ...
When the method dispatch tries to call method(arg): and match up two parameters self, arg against it, you get that error. – smci....
Read more >Python takes 1 positional argument but 2 were given Solution
In this article, we discuss this error and why it is raised. We walk through an example of this error to help you...
Read more >speechbrain/emotion-recognition-wav2vec2-IEMOCAP
We're on a journey to advance and democratize artificial intelligence through ... TypeError: cached_download() takes 1 positional argument but 2 were given.
Read more >save() takes 1 positional argument but 2 were given : r/django
I am trying to register as a seller ( is_seller=True). But I am getting this issue of save() function cant take two positional...
Read more >method() takes 1 positional argument but 2 were given - Finxter
Problem Formulation: Method Takes One Arguments But Two Are Given. Consider the following minimal example where this error occurs. Most occurrences of this ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try downgrading huggingface_hub:
pip uninstall huggingface_hub && pip install huggingface_hub==0.7
@taylorchu this is just a future warning, you can ignore it with