ntivirikin / xeno-canto-py

Python wrapper for the xeno-canto.org API to aid in downloading and managing recordings.
MIT License
35 stars 14 forks source link

Cannot download audio file #7

Closed bilzard closed 2 years ago

bilzard commented 2 years ago

Minimum Reproducible Example

$ xeno-canto -dl Erckel\'s Francolin
Downloading all recordings for query...
Retrieving metadata...
Downloading metadate page 1...
Found 11 recordings for given query, downloading...
Downloading 410277.mp3...
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/envs/pytorch_x86/bin/xeno-canto", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/Caskroom/miniforge/base/envs/pytorch_x86/lib/python3.8/site-packages/xenocanto.py", line 284, in main
    download(params)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/pytorch_x86/lib/python3.8/site-packages/xenocanto.py", line 130, in download
    request.urlretrieve(url, audio_path + audio_file)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/pytorch_x86/lib/python3.8/urllib/request.py", line 247, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/opt/homebrew/Caskroom/miniforge/base/envs/pytorch_x86/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/pytorch_x86/lib/python3.8/urllib/request.py", line 522, in open
    req = meth(req)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/pytorch_x86/lib/python3.8/urllib/request.py", line 1278, in do_request_
    raise URLError('no host given')
urllib.error.URLError: <urlopen error no host given>