You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2019-05-21 11:43:28,237 [ERROR]: brapi_to_isa.py(<module>:424) >>'str' object has no attribute 'term'
Traceback (most recent call last):
File "brapi_to_isa.py", line 422, in<module>
main(arg=SERVER)
File "brapi_to_isa.py", line 373, in main
json.dumps(investigation, cls=ISAJSONEncoder, sort_keys=True, indent=4, separators=(',', ': '))
File "/usr/lib/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/usr/lib/python3.6/json/encoder.py", line 201, in encode
chunks = list(chunks)
File "/usr/lib/python3.6/json/encoder.py", line 437, in _iterencode
o = _default(o)
File "/usr/local/lib/python3.6/dist-packages/isatools/isajson.py", line 1832, in default
"studies": list(map(lambda x: get_study(x), o.studies))
File "/usr/local/lib/python3.6/dist-packages/isatools/isajson.py", line 1832, in<lambda>"studies": list(map(lambda x: get_study(x), o.studies))
File "/usr/local/lib/python3.6/dist-packages/isatools/isajson.py", line 1775, in get_study
"assays": list(map(lambda x: get_assay(x), o.assays))
File "/usr/local/lib/python3.6/dist-packages/isatools/isajson.py", line 1775, in<lambda>"assays": list(map(lambda x: get_assay(x), o.assays))
File "/usr/local/lib/python3.6/dist-packages/isatools/isajson.py", line 1798, in get_assay
"characteristicCategories": get_characteristic_categories(o.characteristic_categories),
File "/usr/local/lib/python3.6/dist-packages/isatools/isajson.py", line 1780, in get_characteristic_categories
return list(map(lambda x: get_characteristic_category(x), o))
File "/usr/local/lib/python3.6/dist-packages/isatools/isajson.py", line 1780, in<lambda>return list(map(lambda x: get_characteristic_category(x), o))
File "/usr/local/lib/python3.6/dist-packages/isatools/isajson.py", line 1663, in get_characteristic_category
"characteristicType": get_ontology_annotation(o)
File "/usr/local/lib/python3.6/dist-packages/isatools/isajson.py", line 1568, in get_ontology_annotation
"annotationValue": o.term,
AttributeError: 'str' object has no attribute 'term'
The isatab.dump instead works flawless on the given dataset.
The text was updated successfully, but these errors were encountered:
I will add a test where we create an investigation with characteristic_category set as a string, and see whether serialising this to JSON triggers an error.
When I try to dump with ISA JSON using:
I get following error:
The isatab.dump instead works flawless on the given dataset.
The text was updated successfully, but these errors were encountered: