I'm getting a json error when trying to add a tag in a PortfolioItem with the addCollectionItems. Code below.
USAGE = """\
Usage: python addtags.py <Feature_id> <tag_name> <tag_name> <tag_name>...
"""
Feature_id = args.pop(0)
tag_names = args[:]
tags = []
response = rally.get('Tag', fetch=True, order="Name", server_ping=False, isolated_workspace=True)
for tag in response:
if tag.Name in tag_names:
tags.append(tag)
Feature = rally.get("Feature", fetch="FormattedID,Name,Description,Tags,_type",
query="FormattedID = %s" % Feature_id, server_ping=False, isolated_workspace=True, instance=True)
Feature_tags = [str(tag.Name) for tag in Feature.Tags]
print("Preexsisting tags : ",Feature_tags)
adds = rally.addCollectionItems(Feature, tags)
I get this error :
Traceback (most recent call last):File "/ws/eduran-ott/vpython/lib/python3.5/site-packages/pyral/rallyresp.py", line 124, in __init__self.content = response.json()File "/ws/eduran-ott/vpython/lib/python3.5/site-packages/requests/models.py", line 897, in jsonreturn complexjson.loads(self.text, **kwargs)File "/sw/packages/python3/3.5.0/lib/python3.5/json/__init__.py", line 319, in loadsreturn _default_decoder.decode(s)File "/sw/packages/python3/3.5.0/lib/python3.5/json/decoder.py", line 339, in decodeobj, end = self.raw_decode(s, idx=_w(s, 0).end())File "/sw/packages/python3/3.5.0/lib/python3.5/json/decoder.py", line 357, in raw_decoderaise JSONDecodeError("Expecting value", s, err.value) from Nonejson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)During handling of the above exception, another exception occurred:Traceback (most recent call last):File "./add.tag.py", line 102, in <module>main(sys.argv[1:])File "./add.tag.py", line 69, in mainadds = rally.addCollectionItems(Feature, tags)File "/ws/eduran-ott/vpython/lib/python3.5/site-packages/pyral/restapi.py", line 1219, in addCollectionItemsresponse = RallyRESTResponse(self.session, context, resource, response, "shell", 0)File "/ws/eduran-ott/vpython/lib/python3.5/site-packages/pyral/rallyresp.py", line 127, in __init__raise RallyResponseError(problem)pyral.rallyresp.RallyResponseError: Response for request: PortfolioItem/388668889576/Tags/add either was not JSON content or was an invalidly formed/incomplete JSON structureAny help is really appreciated.