None
Test: ingestor|tbl|file_found_by_scicat_is_consistent_with_manual|
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
instrument = 'tbl', coda_proposal_id = '999999'
def test_file_found_by_scicat_is_consistent_with_manual(
instrument: str,
coda_proposal_id: str,
) -> None:
> scicat_path = scicat.get_latest_coda_nexus_path(
proposal_id=coda_proposal_id, instrument=instrument
)
tests/ingestor/ingestor_test.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:75: in get_latest_coda_nexus_path
ds = get_latest_coda_dataset(instrument, proposal_id)
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:66: in get_latest_coda_dataset
ds_model = _get_latest_dataset_model(client, instrument, proposal_id)
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:22: in _get_latest_dataset_model
datasets = client.scicat.query_datasets(
.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:839: in query_datasets
dsets_json = self._call_endpoint(
.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:1210: in _call_endpoint
response = self._send_to_scicat(cmd=cmd, url=full_url, data=data, params=params)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def _send_to_scicat(
self,
*,
cmd: str,
url: str,
data: model.BaseModel | None = None,
params: dict[str, str] | None = None,
) -> httpx.Response:
if self._token is not None:
token = self._token.get_str()
headers = {"Authorization": f"Bearer {token}"}
else:
token = ""
headers = {}
if data is not None:
headers["Content-Type"] = "application/json"
serialized_data = data.model_dump_json(exclude_none=True)
else:
serialized_data = None
try:
return httpx.request(
method=cmd,
url=url,
content=serialized_data,
params=params,
headers=headers,
timeout=self._timeout.seconds,
)
except Exception as exc:
# Remove concrete request function call from backtrace to hide the token.
# Also modify the error message to strip out the token.
# It shows up, e.g. in urllib3.exceptions.NewConnectionError.
# This turns the exception args into strings.
# But we have little use of more structured errors, so that should be fine.
> raise type(exc)(
*tuple(_strip_token(arg, token) for arg in exc.args)
) from None
E httpx.ReadTimeout: The read operation timed out
.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:1193: ReadTimeout
None
None
None
None
None
None
None
None