Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while downloading recordings with query_xc #44

Closed
malavika-madh opened this issue Dec 17, 2021 · 4 comments
Closed

error while downloading recordings with query_xc #44

malavika-madh opened this issue Dec 17, 2021 · 4 comments

Comments

@malavika-madh
Copy link

Hi,

I downloaded recordings in the past with no problem using query_xc. Now however, it is giving me an error that "HTTP status was '404 Not Found'". I am trying to download recordings from metadata that I filtered to have only a certain type of vocalization. I downloaded warbleR from github after looking at previous issues but it still has the same problem.

Code:

#Packages
library(devtools)
devtools::install_github("maRce10/warbleR")
library(warbleR)
library(tuneR)
library(maps)
library(tidyr)
library(dplyr)
library(xlsx)
library(writexl)
library(lubridate)
library(plyr)
library(sqldf)

#corvids
Corvus1<- query_xc(qword = "Corvus", download = FALSE)
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=02m 22s
6203 recording(s) found!

#keep only alarm calls
alarm<-sqldf("SELECT * FROM Corvus1 WHERE Vocalization_type LIKE '%alarm%'")

#download recordings
query_xc(X = alarm, download = TRUE)
Downloading files...
| | 0 % ~calculating Error in download.file(url = paste("https://www.xeno-canto.org/download.php?XC=", :
cannot open URL 'https://www.xeno-canto.org/download.php?XC=357593'
In addition: Warning message:
In download.file(url = paste("https://www.xeno-canto.org/download.php?XC=", :
cannot open URL 'https://www.xeno-canto.org/download.php?XC=357593': HTTP status was '404 Not Found'

Thanks in advance!

@thesnakeguy
Copy link

Just wanted to post the same issue. Example:
> query_xc(X = query, download = T, path = "mp3/", parallel = 12) Downloading files... | | 0 % ~calculating Error in checkForRemoteErrors(val) : 12 nodes produced errors; first error: cannot open URL 'https://www.xeno-canto.org/download.php?XC=487296'

A simple
query_xc("Bubo bubo", download = T, path = "mp3/", parallel = 12)
Also gives "Cannot open URL" error.

Many thanks for looking into this.

@maRce10
Copy link
Owner

maRce10 commented Dec 22, 2021

Thanks for reporting. It seems that XC changed the base URL for file downloading. I just updated the function so it's working again. Please re-install warbleR from github.

@maRce10 maRce10 closed this as completed Dec 22, 2021
@thesnakeguy
Copy link

Many thanks maRce10. Enjoy the holidays!

@malavika-madh
Copy link
Author

Thank you so much Marcelo, I tried now and it works.
Merry Christmas and Happy new year!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants