ivmfnal / metacat

Metadata Catalog
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

I'm having trouble making a dataset - here is a minimal #32

Closed hschellman closed 1 year ago

hschellman commented 1 year ago

I can make a dataset on the command line but it seems to fail If I do:

mc_client.create_dataset(did,files_query=query)

with query = files where core.run_type='protodune-sp' and core.file_type=mc and core.data_tier='full-reconstructed' and dune.campaign=PDSPProd4a and created_timestamp >= '2023-01-05' ordered

and name = schellma:protodune-sp_PDSPProd4a_mc_full-reconstructed_ge2023-01-06

python minimal.py Traceback (most recent call last): File "/nashome/s/schellma/minimal.py", line 14, in mc_client.create_dataset(did,files_query=query) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.36.4-py3.9.egg/metacat/webapi/webapi.py", line 461, in create_dataset return self.post_json(url, params) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.36.4-py3.9.egg/metacat/webapi/webapi.py", line 205, in post_json response = self.send_request("post", uri_suffix, data=data, headers=headers, stream=True) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.36.4-py3.9.egg/metacat/webapi/webapi.py", line 158, in send_request raise WebAPIError(url, response) metacat.webapi.webapi.WebAPIError: Token expired minimal.py is: import sys,os,subprocess,json import samweb_client from metacat.webapi import MetaCatClient samweb = samweb_client.SAMWebClient(experiment='dune') mc_client = MetaCatClient(os.getenv("METACAT_SERVER_URL")) query = "files where core.run_type='protodune-sp' and core.file_type=mc and core .data_tier='full-reconstructed' and dune.campaign=PDSPProd4a and created_timesta mp >= '2023-01-05' ordered" did = "schellma:protodune-sp_PDSPProd4a_mc_full-reconstructed_ge2023-01-06" mc_client.create_dataset(did,files_query=query)
ivmfnal commented 1 year ago

The error message says: Token expired Please refresh your token. Use "metacat auth login..."