Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nidm/experiment/Core.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def serializeJSONLD(self):
"startedAtTime": { "@type": "xsd:dateTime", "@id": "prov:startedAtTime" },
"endedAtTime": { "@type": "xsd:dateTime", "@id": "prov:endedAtTime" }
}
return rdf_graph_parse.serialize(format='json-ld', context=context, indent=4).decode('ASCII')
return rdf_graph_parse.serialize(format='json-ld', context=context, indent=4)

def save_DotGraph(self,filename,format=None):
dot = prov_to_dot(self.graph)
Expand Down
2 changes: 1 addition & 1 deletion nidm/experiment/tools/BIDSMRI2NIDM.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def main(argv):
if args.jsonld:
f.write(project.serializeJSONLD())
else:
f.write(project.serializeTurtle())
f.write(project.serializeTurtle().decode('ASCII'))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pynidm is py3 only. why would this be necessary. were you testing on python 3 or 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just moving the decode('ASCI') away -- not introducing it. I am not sure why one wants this, but it certainly is detrimental for JSON-LD. If you are confident that it being there at all (and not just in the way of JSON-LD) is the real bug, I have no objections to wipe it out entirely. And no, this is all PY3.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks - will take a look

#f.write(project.graph.get_provn())
#save a DOT graph as PNG
project.save_DotGraph(str(outputfile + ".png"), format="png")
Expand Down