Open onnyyonn opened 11 months ago
I'm having the same issue!
@onnyyonn and @siankg the issue is the ordering, because the code is catching the additional unspecified keyword arguments internally, you need to use connection.new_context(facets="source", **query_params)
rather than connection.new_context(**query, facets="source")
. Make sure the parameters destined for new_context come before the search parameters.
Thanks for the info! I tried switching it but got the same error message.
ctx = conn.new_context(facets='project,institution_id,source_id,activity_id,experiment_id,variable,frequency', latest = True, institution_id = mod_inf[0], source_id = mod_inf[1], project = 'CMIP6', activity_id='CMIP', experiment_id = 'historical', variable='fBNF,cVeg,nVeg,npp,pr,tas', frequency='mon')
Thanks for the info! I tried switching it but got the same error message.
ctx = conn.new_context(facets='project,institution_id,source_id,activity_id,experiment_id,variable,frequency', latest = True, institution_id = mod_inf[0], source_id = mod_inf[1], project = 'CMIP6', activity_id='CMIP', experiment_id = 'historical', variable='fBNF,cVeg,nVeg,npp,pr,tas', frequency='mon')
Gave myself a red herring (it disappeared temporarily for me, but it was late at night): will post here again, having an investigate!
Further to this, I wasn't realising the warning comes from the invocation of file_context
or aggregation_context
, neither of which accept facets themselves.
I am searching for all the files matching a given list of parameters. Even though I specify
facets
while creating anew_context
, I still get the facets warning. In case it matters, I am creating a number of new contexts inside loops. Here is an example code snippet for what I am trying to do:Here I am calling the
search_esgf
function inside loops, and inside that function a new context is being created, withfacets='source_id'
specified. Why do I still get the facets warning?