Feature #23289
Return both campaign name and stage name for the get_campaign_stage_name poms_client API
Description
The current poms_Client API: get_campaign_stage_name(experiment, campaign_stage_id, test=None, configfile=None) return campaign_stage_Name. We have a use case that we need to get the campaign name from a stage id. So make the API return both names will solve the problem.
History
#1 Updated by Vladimir Podstavkov 3 months ago
- Estimated time set to 4.00 h
- % Done changed from 0 to 100
- Status changed from New to Resolved
#2 Updated by Yuyi Guo 3 months ago
Hi Vladimir:
I got below error while running the API. Could you take a look?
Yuyi
d=poms_client.get_campaign_stage_name(experiment, 1843, test=test, role=role)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/nashome/y/yuyi/project-py/poms/poms_client/python/poms_client.py", line 236, in get_campaign_stage_name
return json.loads(data)
File "/cvmfs/larsoft.opensciencegrid.org/products/python/v2_7_15a/Linux64bit+2.6-2.12/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/cvmfs/larsoft.opensciencegrid.org/products/python/v2_7_15a/Linux64bit+2.6-2.12/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/cvmfs/larsoft.opensciencegrid.org/products/python/v2_7_15a/Linux64bit+2.6-2.12/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded