API duration filter request

瀏覽次數:62 次
跳到第一則未讀訊息

inou

未讀,
2021年5月17日 凌晨4:44:442021/5/17
收件者:Freesound API
Hi,

As I mentioned in this thread (https://freesound.org/forum/bug-reports-errors-and-feature-requests/43034/), when requesting using the filtering by the duration the response received is an ERROR 400. 

This is part of the code used: 

results_pager = freesound_client.text_search(
    query="relax",
    fields="id,name,username,license,type,duration",
    filter="duration:[0.0 TO 901.0]",
    sort="duration_desc"
)


On the other hand, the used URL callback is the following: 

Regards,
Ignasi.

Frederic Font Corbera

未讀,
2021年5月17日 上午10:52:282021/5/17
收件者:freeso...@googlegroups.com
Hi Ignasi,

Looking at the code I assume you're using the Python client. Make sure you're using the latest version (releases ~25 days ago) of it which does not include "www" in the base URL. I suspect you might be using  a docker image from a UPF workshop which includes the python client. In that case you should pull the newest version of the image (which I just pushed) to make sure you get the up to date dependencies. You probably need to tell docker-compose to force rebuild the images.

Cheers,

frederic


--
Frederic Font - ffont.github.io
Music Technology Group, UPF - mtg.upf.edu
Freesound - freesound.org



--

---
You received this message because you are subscribed to the Google Groups "Freesound API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freesound-ap...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/freesound-api/8aa961be-a1b6-4729-b805-38d0d2d06776n%40googlegroups.com.

inou

未讀,
2021年5月17日 下午2:18:562021/5/17
收件者:freeso...@googlegroups.com
Hi Frederic,

Thanks for the quick reply. 
Yes, I am using the Python client, the one from the MTG GitHub (https://github.com/MTG/freesound-python).
I just deleted the old one, cloned the new version, and reinstalled it, I had a previous version (with the www), but I keep getting the same error message.

Regards,
Ignasi. 

Missatge de Frederic Font Corbera <freder...@upf.edu> del dia dl., 17 de maig 2021 a les 16:52:
You received this message because you are subscribed to a topic in the Google Groups "Freesound API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/freesound-api/DIrOKiuJ0Ro/unsubscribe.
To unsubscribe from this group and all its topics, send an email to freesound-ap...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/freesound-api/CABDPa_yXwCW7kotE_kcdzekYy4wvT4md7dLEd0_i19gyY0QK%2BA%40mail.gmail.com.

Saba Nazir

未讀,
2021年5月17日 下午2:43:112021/5/17
收件者:Freesound API
Hi Frederic,

Initially the newer version with no www in Host name worked for me for filtering audios but after retrieving every 15 files whenever it goes to the next page I get the same error. 
Do you think I need to update something else?

Thanks
Saba. 

Frederic Font Corbera

未讀,
2021年5月18日 凌晨1:31:392021/5/18
收件者:freeso...@googlegroups.com
Hi,

There is indeed an issue with the pagination which has just been fixed.
@Ignasi: if your error has happening when doing pagination, it should be fixed now. However also double-check that the queries you're making to Freesound don't have the www. in them. You might want to hack the python client to add a print statement when the url is constructed.

Cheers,

frederic

--
Frederic Font - ffont.github.io
Music Technology Group, UPF - mtg.upf.edu
Freesound - freesound.org


Saba Nazir

未讀,
2021年5月18日 清晨6:57:222021/5/18
收件者:Freesound API
Hi,

Thanks Frederic. It's resolved for me. 
@Ignasi: I simply installed the newer Python client and now it is working for me. 

Best,
Saba. 

inou

未讀,
2021年5月20日 凌晨4:47:462021/5/20
收件者:freeso...@googlegroups.com
Hi,

I have just checked it and I had the same related error to the pagination. Now it is working fine. 

Thank you,
Regards,
Ignasi.

Missatge de Saba Nazir <wwor...@gmail.com> del dia dt., 18 de maig 2021 a les 12:57:
回覆所有人
回覆作者
轉寄
0 則新訊息